Fix max string length validation

This commit is contained in:
Andrew Kingston 2021-01-29 13:24:43 +00:00
parent a4de9668ed
commit 28fb04b31e
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ export const createValidatorFromConstraints = (constraints, field, table) => {
} }
// String length constraint // String length constraint
if (constraints.length?.maximum != null) { if (constraints.length?.maximum) {
const length = constraints.length?.maximum const length = constraints.length.maximum
checks.push(lengthConstraint(length)) checks.push(lengthConstraint(length))
} }