diff --git a/src/@utils/schaclSchema.ts b/src/@utils/schaclSchema.ts index 3d73df8d2..badb6e710 100644 --- a/src/@utils/schaclSchema.ts +++ b/src/@utils/schaclSchema.ts @@ -37,9 +37,10 @@ export async function validateFieldSchaclSchema( value: any, createError: any ): Promise { - const schemaField: any = await retrieveShaclSchema() - const fieldSchema: ShaclSchemaField = schemaField[keyField][valueField] + const schemaFields: any = await retrieveShaclSchema() + const fieldSchema: ShaclSchemaField = schemaFields[keyField][valueField] const { minLength, maxLength } = getMinMax(valueField, fieldSchema) + console.log(schemaFields) // TODO: add minLength when integrated in endpoint if (value.length < minLength) { diff --git a/src/components/Publish/_validation.ts b/src/components/Publish/_validation.ts index 7fcde2c56..ff9696615 100644 --- a/src/components/Publish/_validation.ts +++ b/src/components/Publish/_validation.ts @@ -66,7 +66,7 @@ const validationMetadata = { createError ) }), - termsAndConditions: Yup.boolean() + termsAndConditions: Yup.boolean().isTrue() } const validationService = {