Fixing issue with min/max in numbers.

This commit is contained in:
mike12345567 2021-05-28 19:52:30 +01:00
parent 507e2587c6
commit d5431665e9
1 changed files with 3 additions and 0 deletions

View File

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