I suggest to expose invalidFields list within arguments of form.validate() payload.
Why
This dramatically increases the debugging, as otherwise a form needs to have an explicit onInvalid callback. This shouldn't affect the flow, since form.validate() is, if called, performed manually anyway.
This would also allow to access the flat list of all error messages, as opposed to trying to get that from the fields Map.
The existing form validate/submit flow remains as-is.
What
I suggest to expose
invalidFields
list within arguments ofform.validate()
payload.Why
This dramatically increases the debugging, as otherwise a form needs to have an explicit
onInvalid
callback. This shouldn't affect the flow, sinceform.validate()
is, if called, performed manually anyway.This would also allow to access the flat list of all error messages, as opposed to trying to get that from the
fields
Map.The existing form validate/submit flow remains as-is.