Fixing issue with min/max in numbers.
This commit is contained in:
parent
133733740b
commit
8b32c7073d
|
@ -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