Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose "invalidFields" in the result of "form.validate()" call #346

Open
kettanaito opened this issue Dec 5, 2018 · 0 comments
Open

Expose "invalidFields" in the result of "form.validate()" call #346

kettanaito opened this issue Dec 5, 2018 · 0 comments
Labels
enhancement Enhances existing functionality. scope:validation Changes affect validation.
Projects
Milestone

Comments

@kettanaito
Copy link
Owner

kettanaito commented Dec 5, 2018

What

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.

@kettanaito kettanaito added enhancement Enhances existing functionality. scope:validation Changes affect validation. labels Dec 5, 2018
@kettanaito kettanaito added this to the 1.x milestone Dec 5, 2018
@kettanaito kettanaito changed the title Expose "invalidFields" as the second argument of "form.validate()" payload Expose "invalidFields" in the result of "form.validate()" call Dec 6, 2018
@kettanaito kettanaito added this to In scope in Roadmap Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances existing functionality. scope:validation Changes affect validation.
Projects
Roadmap
  
In scope
Development

No branches or pull requests

1 participant