Fixing issue with min/max in numbers.

This commit is contained in:
mike12345567 2021-05-28 19:52:30 +01:00
parent 133733740b
commit 8b32c7073d
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ const lengthConstraint = maxLength => value => {
} }
const numericalConstraint = (constraint, error) => value => { const numericalConstraint = (constraint, error) => value => {
if (value == null || value === "") {
return null
}
if (isNaN(value)) { if (isNaN(value)) {
return "Must be a number" return "Must be a number"
} }