1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix terms

This commit is contained in:
EnzoVezzaro 2022-09-26 09:51:09 -04:00
parent 74ba8c4664
commit f4428feb52
2 changed files with 4 additions and 3 deletions

View File

@ -37,9 +37,10 @@ export async function validateFieldSchaclSchema(
value: any,
createError: any
): Promise<any> {
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) {

View File

@ -66,7 +66,7 @@ const validationMetadata = {
createError
)
}),
termsAndConditions: Yup.boolean()
termsAndConditions: Yup.boolean().isTrue()
}
const validationService = {