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
Hmm, this seems to happen because the input field doesn't lose focus on Enter (it doesn't blur?)..
In the catalog example you can even see the success message on top of the failure message.
Making the input field lose focus in any way (clicking outside the input field, switching browser tab) seems to trigger the correct validation.
The difference in the catalog sample is that the input has valid in its class name.
Strange.
Tbh I think with aurelia-validation this is totally up to the user. That means if you configure blur as the validation trigger (it's the default) it won't trigger on change or keyup. Native input elements don't blur on enter, either..
However, I know from personal experience that such a blur-on-enter functionality can be very handy. I will add an additional option as a custom attribute md-blur-on-enter which does that. It will blur the input on enter and thus trigger validation (default is false to not break anything).
I'm submitting a bug report
0.17.2
0.13.1
OSX 10.11.6
6.7.0
3.10.8
Chrome 54.0.2840.71 (64-bit)
ESNext
view-model.js
view.html
Current behavior:
Type valid email into input, click "Send" button. Input contains "valid" in the class name.
Type valid email into input and press Enter. Input contains "invalid" in the class name.
Expected/desired behavior:
Input should remain valid after form submission by Enter.
Without md-validate="true" works fine.
The text was updated successfully, but these errors were encountered: