frictionlessdata/frictionless-py

Customizing Error Messages for pattern Validation

Opened this issue · 0 comments

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.