Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

input with [type="number"] has a non numeric value for length #332

Open
FrDH opened this issue May 13, 2020 · 1 comment
Open

input with [type="number"] has a non numeric value for length #332

FrDH opened this issue May 13, 2020 · 1 comment

Comments

@FrDH
Copy link

FrDH commented May 13, 2020

Trying to apply the numericality validation on an input with [type="number"], but getting the error in the console:

myNumberField has a non numeric value for length

Meaning, the value should be converted into a string before trying to do .length on it.

@FrDH
Copy link
Author

FrDH commented May 20, 2020

Could be fixed by adding .toString() to
https://github.com/ansman/validate.js/blob/master/validate.js#L792

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

No branches or pull requests

1 participant