We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ajvConfigParams
We created a custom format for phone numbers. As it is a function and not a regexp, I tried to pass it to Ajv via the following options:
format
this.validator = buildSchemaSync(this.spec, { ajvConfigParams: { formats: { email: emailValidator.validate, phone: phoneValidator.validate, // <- }, }, })
For request parameters, this is working fine, but when I validate arequest body with this format, it failing with the following message:
Error: unknown format "phone" is used in schema at path "#/anyOf/1/properties/phoneNumber"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We created a custom
format
for phone numbers. As it is a function and not a regexp, I tried to pass it to Ajv via the following options:For request parameters, this is working fine, but when I validate arequest body with this format, it failing with the following message:
The text was updated successfully, but these errors were encountered: