You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commit 4707988 introduced a change of when the checks are run.
Previously, checks on a form field are only run once the user placed the cursor inside, made a change, or moved the cursor outside again. Plus, when the user submitted the form.
Now, the function formIsErrorFree calls runCheck on all listeners if their status is null.
If I enter "foo" (or anything else), it now immediately highlights an error on the dropdown, because I haven't selected a value there.
A more complex form that is empty at initialization, would be full with error messages before the user even has the chance to enter values.
I really don't like this behavior and have reverted back to 1.0.3 in my application. I understand that formIsErrorFree is used to programmatically check whether the form is valid and it that case it is totally valid to check all the form fields at once. But this should not be used internally whenever a change is triggered on a field.
The text was updated successfully, but these errors were encountered:
I totally agree. It was an error on my part to release it like that (no unit tests, ouch) and it will be the first thing I would take a look at once I get my thesis over with. :)
@mbuchetics so I'm having a forced break from thesis, and doing some development on nod. That is, I'm rebuilding it from scratch in pure js. The behavior you describe here most likely won't be fixed for current versions of nod (unless I feel like it), but of course won't be present in the new version. :-)
The commit 4707988 introduced a change of when the checks are run.
Previously, checks on a form field are only run once the user placed the cursor inside, made a change, or moved the cursor outside again. Plus, when the user submitted the form.
Now, the function
formIsErrorFree
callsrunCheck
on all listeners if their status is null.You can see that change on example 3:
http://casperin.github.io/nod/ (here, 1.0.3 is still used)
http://jsfiddle.net/vb2hZ/ (this uses the latest version, 1.0.5)
If I enter "foo" (or anything else), it now immediately highlights an error on the dropdown, because I haven't selected a value there.
A more complex form that is empty at initialization, would be full with error messages before the user even has the chance to enter values.
I really don't like this behavior and have reverted back to 1.0.3 in my application. I understand that
formIsErrorFree
is used to programmatically check whether the form is valid and it that case it is totally valid to check all the form fields at once. But this should not be used internally whenever a change is triggered on a field.The text was updated successfully, but these errors were encountered: