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

Validator should validate also on some specialized event #23

Open
pmaselkowski opened this issue Jan 19, 2017 · 0 comments
Open

Validator should validate also on some specialized event #23

pmaselkowski opened this issue Jan 19, 2017 · 0 comments

Comments

@pmaselkowski
Copy link
Member

pmaselkowski commented Jan 19, 2017

This might be useful in one (more?) scenario:

Let's name event validate-all

  1. User omitted required field
  2. Submits data - here validate-all event be used
  3. Server side validation is performed
  4. Server side generated error message is displayed
  5. Non-valid fields should be highlighted - by event validate-all

This could have options, like:

event.data.showResults = {
    success: false, // Don't show success validation
    error: true // Show error validation
};

Solution with showResults could be used to emphasize invalidated inputs, rather than all.

Cons: This could lead to massive validation calls on complex forms.
Maybe also could limit to some particular model or by callback etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant