From 7b74489b59f29ce68da1227b299f0a74c53fd055 Mon Sep 17 00:00:00 2001 From: nelyaklyusa Date: Thu, 6 Jun 2024 11:08:44 +0300 Subject: [PATCH] small fix --- src/helpers/validation/ajv.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/helpers/validation/ajv.ts b/src/helpers/validation/ajv.ts index 0d80129..bbde480 100644 --- a/src/helpers/validation/ajv.ts +++ b/src/helpers/validation/ajv.ts @@ -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) => (