From 50a8f78b8a504b8a9910dafb05c97225ecae3ebe Mon Sep 17 00:00:00 2001 From: Greg Rushton Date: Tue, 17 Oct 2023 17:12:08 -0400 Subject: [PATCH] cleanup --- src/pages/data_submission/RegistrationValidation.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/data_submission/RegistrationValidation.js b/src/pages/data_submission/RegistrationValidation.js index 051f825a9..a1fd9e061 100644 --- a/src/pages/data_submission/RegistrationValidation.js +++ b/src/pages/data_submission/RegistrationValidation.js @@ -10,12 +10,12 @@ import {get, isNil, set} from 'lodash'; */ export const compileSchema = (schema) => { const ajv = new Ajv({strict: false, allErrors: true}); - ajv.addKeyword('label'); - ajv.addKeyword('prompt'); addFormats(ajv); - ajv.addFormat('date', dateValidator.isValid); - ajv.addFormat('uri', urlValidator.isValid); - ajv.addFormat('email', emailValidator.isValid); + ajv.addKeyword('label') + .addKeyword('prompt') + .addFormat('date', dateValidator.isValid) + .addFormat('uri', urlValidator.isValid) + .addFormat('email', emailValidator.isValid); // Ajv doesn't like the `$schema` and `version` properties // eslint-disable-next-line no-unused-vars