You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
If one uses init() Method to add elements within a Fieldset, they are not completely removable. While the element isn't present in the form anymore, the respective InputFilter (which addresses validation of the previously removed element) still is.
This leads to an invalid form, but no error messages are shown (because the elements which cause the error do not exist and are therefore they are not rendered nor the error messages are).
Wouldn't it be more suitable if an element is removed to remove their InputFilter(Specification) too?
I think we need to modify the isValid-Method in "zend-form/src/Form.php" to skip InputFilters of previously removed elements.
I know we are able to set elements which should be validated via setValidationGroup. If a form has many fieldsets / elements this method is somewhat hackish. Is there any other possible solution to this problem?
It sounds to me like you're removing the elements after you've set the data (or called bind() or prepare()). I'm pretty sure the default input filter isn't created until that point. Can you remove them earlier?
If one uses init() Method to add elements within a Fieldset, they are not completely removable. While the element isn't present in the form anymore, the respective InputFilter (which addresses validation of the previously removed element) still is.
This leads to an invalid form, but no error messages are shown (because the elements which cause the error do not exist and are therefore they are not rendered nor the error messages are).
Wouldn't it be more suitable if an element is removed to remove their InputFilter(Specification) too?
I think we need to modify the isValid-Method in "zend-form/src/Form.php" to skip InputFilters of previously removed elements.
I know we are able to set elements which should be validated via setValidationGroup. If a form has many fieldsets / elements this method is somewhat hackish. Is there any other possible solution to this problem?
My code:
VAR_DUMP if form is invalid (normally we have error messages here):
VAR_DUMP is executed but getMessages delivers empty array.
Any clues?
The text was updated successfully, but these errors were encountered: