Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nelyaklyusa committed Jun 6, 2024
1 parent 077e1ca commit 7b74489
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/helpers/validation/ajv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ import {
ZIP_REGEX_ERROR_MESSAGE, CHECKBOX_TRUE_VALIDATOR_NAME, CHECKBOX_TRUE_ERROR_MESSAGE,
NOT_ZERO_VALIDATOR_NAME, NOT_ZERO_ERROR_MESSAGE, MUST_BE_US_VALIDATOR_NAME, MUST_BE_US_ERROR_MESSAGE,
} from './constants';
import { CitizenTypes } from '@/views/Invest/utils';

const ajv = new Ajv({ allErrors: true, allowMatchingProperties: true, $data: true });

ajvErrors(ajv);
addFormats(ajv, ['date', 'time', 'float', 'email']);


enum CitizenTypes {
us_citizen = 'U.S. Citizen',
us_resident = 'U.S. Resident',
us_non_resident = 'Non Resident'
}

ajv.addKeyword({
keyword: NOT_EMPTY_VALIDATOR_NAME,
validate: (_schema: unknown, data: unknown) => (
Expand Down

0 comments on commit 7b74489

Please sign in to comment.