Fix max string length validation

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

View File

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