Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Feature request: events when validation changes #55

Open
jklein24 opened this issue Jan 6, 2015 · 2 comments
Open

Feature request: events when validation changes #55

jklein24 opened this issue Jan 6, 2015 · 2 comments

Comments

@jklein24
Copy link

jklein24 commented Jan 6, 2015

The old input-valid and input-invalid events were pretty useful, but they're gone now. Is there any reason we can't put them back in?

@ssorallen
Copy link

Input validity seems to be covered well by native APIs. By default and according to the spec, validity of inputs is checked only when the hosting <form> is submitted. You can call checkValidity directly on an input element to check if its current value is valid outside when the hosting form is submitted, and an "invalid" event is fired if the input is invalid when that method is called.

@ssorallen
Copy link

The anecdotal reasoning behind checking validity only on submit is that it's not possible to assert a user is done editing input until the user tries to submit the form. You can possibly infer that blurring an input field is an assertion of validity, but that's not always true.

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

No branches or pull requests

2 participants