Browse Source
Merge pull request #4077 from mslourens/maxlength_validation
fix schema constraint mapping to validation rule
master
Rory Powell
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
packages/client/src/components/app/forms/validation.js
|
|
@ -37,7 +37,7 @@ export const createValidatorFromConstraints = ( |
|
|
const length = schemaConstraints.length.maximum |
|
|
const length = schemaConstraints.length.maximum |
|
|
rules.push({ |
|
|
rules.push({ |
|
|
type: "string", |
|
|
type: "string", |
|
|
constraint: "length", |
|
|
constraint: "maxLength", |
|
|
value: length, |
|
|
value: length, |
|
|
error: `Maximum length is ${length}`, |
|
|
error: `Maximum length is ${length}`, |
|
|
}) |
|
|
}) |
|
|
|