Closed robert-iddink closed 8 years ago
I think this should only happen if you have an input of type number as your e-mail input field. Which actually does not make sense at all. :) Can you give some details about how you got NaN there?
Thanks for your reply!
Agreed on the type="number" ;-). In our case, the type="email" (hardcoded), so that shouldn't be the cause.
The problem does not occur when we directly open the URL where the form is located (http://localhost:8000/ui/#/user/register).
The problem only happens when we switch from another state to the state with the form (i.e., browse to http://localhost:8000/ui/#/user/login and click 'create user', which navigates to http://localhost:8000/ui/#/user/register).
The input is bound via ng-model to a property of type 'string' (defined in its TypeScript interface).
We're using Angular, angular-ui-router, TypeScript and valdr. I saw it happen both in Chrome and Firefox.
Any ideas?
Any updates on this?
@philippd I'd like to close this as we seem to agree that number types for email input fields is not a legit use case. The real issue appears to be unrelated to valdr and should be handled as a support request. Agree?
Agreed Marcel, the value should never become NaN and if it does, the cause lies somewhere else.
Ran into this in our project, where the input was NaN at some time.