Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number validations #137

Closed
gkurdej opened this issue Mar 1, 2017 · 4 comments
Closed

Number validations #137

gkurdej opened this issue Mar 1, 2017 · 4 comments

Comments

@gkurdej
Copy link

gkurdej commented Mar 1, 2017

I have an issue with number validators.
Input type="input", inputType="number" - validation always fails with message "Invalid number".
Here is example fiddle - try to enter number in Age field:
https://jsfiddle.net/o6tfzccs/1/

Validators (nubmer, integer, double) uses lodash isNumber function, which evaluates to false if argument is type of string. Maybe I'm wrong, but value, which is returned from input is type of string and should be converted to number before validation?
https://lodash.com/docs/4.17.4#isNumber

@cristijora
Copy link
Collaborator

That seems to be a bug. I guess it's pretty easy to fix.

@icebob
Copy link
Member

icebob commented Mar 1, 2017

I'm on it.

@icebob icebob closed this as completed in 22ac59e Mar 1, 2017
@icebob
Copy link
Member

icebob commented Mar 1, 2017

@gkurdej
Copy link
Author

gkurdej commented Mar 1, 2017

Test passed. Good job :)

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

No branches or pull requests

3 participants