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

[Validation] "on: 'blur'" and "on: 'change'" validation settings produce an error when used on a selection dropdown that allows a user to search through a list of options #3208

Closed
awgv opened this issue Oct 19, 2015 · 3 comments

Comments

@awgv
Copy link
Member

awgv commented Oct 19, 2015

Hey,

From what I briefly tested, validation actually works for the dropdown (or it seems this way), just throws an error for some reason. You also won't see an error if you'll somehow induce validation checking before touching the dropdown, say, by submitting a form or correcting some other field that didn't pass on: 'blur' validation before—try it, reload that JSFiddle, submit the form first, then click on the dropdown and outside of it and its list of options to get an error (that you won't get this way). The solution right now is to leave the setting on the default on: 'submit', but a form may contain other inputs that can benefit from on: 'blur' or on: 'change'.

Thank you for your time.

@dwightbcoder
Copy link

I was going to post the same thing, I had not yet narrowed it down to the dropdown but did determine on: 'blur' resulted in the error Uncaught TypeError: Cannot assign to read only property 'identifier' of false and on: 'submit' works as expected.

@ghost
Copy link

ghost commented Oct 28, 2015

I solved by changing the form's selectors:

selector {
 message : ' .error.message ' ,
 field : 'input:not(.search), textarea, select' ,
 group: ' .field ' ,
 input : ' Input ' ,
 prompt : ' .prompt ' ,
 submit : ' .submit '
}

this excludes the search input of the dropdown from validation.

@awgv
Copy link
Member Author

awgv commented Nov 2, 2015

It was fixed with #3131 and 2.1.5.

@awgv awgv closed this as completed Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants