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
When validating, we usually append additional info from submitted values why the form was invalid, this makes it really awkward to use with custom validators (or when skipping netteForms.js validation for complex nested controls). I'd not expect it to throw any warnings when using getValues() with invalid form/container
Additionally, the same error occurs when the validator has second argument in it's signature!
Version: 3.1.1
Bug Description
When validation of form/container fails, any getValues() call after it (in onError / onValidate handlers) causes User warning
Steps To Reproduce
Presenter:
Latte:
Outputs:
dump('validation fail') 📍'validation fail'
dump('second validation') 📍'second validation'
dump($form->isValid()) 📍false
... and triggers the warning
Expected Behavior
When validating, we usually append additional info from submitted values why the form was invalid, this makes it really awkward to use with custom validators (or when skipping
netteForms.js
validation for complex nested controls). I'd not expect it to throw any warnings when using getValues() with invalid form/containerAdditionally, the same error occurs when the validator has second argument in it's signature!
Possible Solution
Just ... remove it? What's the point?
forms/src/Forms/Container.php
Lines 115 to 117 in 05d14fe
The text was updated successfully, but these errors were encountered: