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

Form validation not triggering when changing the default validation method #260

Open
liorcode opened this issue Nov 7, 2016 · 2 comments
Labels

Comments

@liorcode
Copy link
Contributor

liorcode commented Nov 7, 2016

When I change the default validation method to something other than watch:

$validationProvider.setValidMethod('submit');

The form validation does not trigger. Meaning, that after clicking "submit", the success method will not be called and the form controller $valid and $invalid properties will remain undefined.

Notice that it does set the validity of each of the fields (all of the fields get $valid = true) - but not of the form controller - and therefore the success method never runs.

See Plunker with the bug here: http://plnkr.co/edit/rVFjmICigLFLUlKsBjwD?p=preview
If you change the "setValidMethod" there to "watch", it will work. The rest of the methods (submit, submit-only and sometimes also 'blur') do not work.

@hueitan hueitan added the bug label Nov 7, 2016
@hueitan
Copy link
Owner

hueitan commented Nov 7, 2016

hmmm.. this is weird, it doesn't work 💥

@chorsnell
Copy link
Contributor

Running into this issue too!

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

No branches or pull requests

3 participants