Skip to content
New issue

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

How to customize error information #210

Closed
jingyuLin1999 opened this issue Jun 24, 2021 · 3 comments
Closed

How to customize error information #210

jingyuLin1999 opened this issue Jun 24, 2021 · 3 comments

Comments

@jingyuLin1999
Copy link

How to customize error information in schema?
like this:

{
    "userName": {
      "type": "string",
      "minLength": 1,
      "require": true,
      "pattern": "\\d+_\\d+_\\d+",
      "message":"ERROR MESSAGE"
    },
}
@karlguillotte
Copy link

You can use https://github.com/ajv-validator/ajv-errors

@epoberezkin
Copy link
Member

Thank you! Closing it.

@jingyuLin1999
Copy link
Author

Thanks for you reply. it resolve my issue, however ajv-validator/ajv-errors have the same issue in IE11.
How to resolve it?
Look forward to your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants