1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

Merge branch 'master' into enable-source-maps

This commit is contained in:
Sam Rose 2023-12-19 11:26:54 +00:00 committed by GitHub
commit d8aac1f489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -164,7 +164,8 @@
// Required constraint
if (
field === dataSourceSchema?.table?.primaryDisplay ||
constraints.presence?.allowEmpty === false
constraints.presence?.allowEmpty === false ||
constraints.presence === true
) {
rules.push({
constraint: "required",

View file

@ -23,7 +23,8 @@ export const createValidatorFromConstraints = (
// Required constraint
if (
field === table?.primaryDisplay ||
schemaConstraints.presence?.allowEmpty === false
schemaConstraints.presence?.allowEmpty === false ||
schemaConstraints.presence === true
) {
rules.push({
type: schemaConstraints.type == "array" ? "array" : "string",