Fixing issue with min/max in numbers.
This commit is contained in:
parent
507e2587c6
commit
d5431665e9
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue