zend-form-fieldset

How to apply InputFilter validators to fieldset elements in ZF3

独自空忆成欢 提交于 2019-12-13 03:49:59
问题 I had a form that had two fields. An InputFilter with validators was applied to it. It was working fine. Then I moved the fields to a fieldset and added the fieldset to the form. Now the assignment validators to the fields is not present. The validator objects isValid method is not triggered at all. So how to apply the InputFilter validators to fields in a fieldset? Here you are the classes: Text class Validator namespace Application\Validator; use Zend\Validator\StringLength; use Zend

ZF2/Doctrine2 - Fieldsets not validated, data is always valid

强颜欢笑 提交于 2019-12-03 18:15:31
问题 I've set up a structure using Abstract classes for Forms, Fieldsets and InputFilters. Forms and Fieldsets have Factories while InputFilters are created and set on the Fieldsets by the FieldsetFactory (uses the MutableCreationOptionsInterface to pass along options) The problem I have is that InputFilters are loaded for the Form, but are not used to validate the data. All input is accepted as valid. E.g. I have a Country Entity with a name property. The name of the Country must be at least 3

ZF2/Doctrine2 - Fieldsets not validated, data is always valid

笑着哭i 提交于 2019-11-29 16:24:37
I've set up a structure using Abstract classes for Forms, Fieldsets and InputFilters. Forms and Fieldsets have Factories while InputFilters are created and set on the Fieldsets by the FieldsetFactory (uses the MutableCreationOptionsInterface to pass along options) The problem I have is that InputFilters are loaded for the Form, but are not used to validate the data. All input is accepted as valid. E.g. I have a Country Entity with a name property. The name of the Country must be at least 3 chars and max 255. When the name is "ab", it's found to be valid. Before someone asks : no error is