Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Oct 17, 2023
1 parent b4754d6 commit 50a8f78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/data_submission/RegistrationValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50a8f78

Please sign in to comment.