ember-changeset-validations
ember-changeset-validations copied to clipboard
Readme "validateNumber" incorrect description
The readme for validator number contains the following:
propertyName: validateNumber({ gte: 10 }), // greater than or equal to 5
Comment there should say 10 instead of 5.
Thanks! Would you like to open a PR to correct this?
Number is not perfect as validation. HTML 5 validation of type="number" will not return a value when the number field has non numerical characters in it.
You can do something like typeof element.validity !== "undefined" to first see if the input is refusing to pass the value it contains to javascript.