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

Customizing Error Messages for pattern Validation #1664

Open
megin1989 opened this issue Jun 25, 2024 · 0 comments
Open

Customizing Error Messages for pattern Validation #1664

megin1989 opened this issue Jun 25, 2024 · 0 comments

Comments

@megin1989
Copy link

Overview

When validating a JSON field with a pattern constraint, we receive the following error message:

"message": "The cell \"202iiii\" in row at position \"8\" and field \"RECORDED_TIME\" at position \"19\" does not conform to a constraint: constraint \"pattern\" is \"([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))\""
Expected Behavior:

****Is there a way to customize these error messages within the framework configuration itself, without having to write custom Python functions? Specifically, we want more user-friendly error messages that clearly describe the validation error.

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

No branches or pull requests

1 participant