-
Notifications
You must be signed in to change notification settings - Fork 282
Open
Description
It would be helpful to have a way to override the default error message, either through interceptors or by specifying it within the JSON schema.
For example, consider this object:
"reference": {
"maxLength": 2147483647,
"minLength": 6,
"pattern": "^[A-Za-z0-9 /.-]*$",
"type": "string",
"description": "Reference Data.",
"example": "Az074-124",
"errorMessage": [
{
"pattern": "must be alphanumeric and can contain only the following special characters: /.-"
}
]
}
In this case, instead of displaying the default error message:
#/payoutDefaults/compliance/reference: string [@#] does not match pattern ^[A-Za-z0-9 /.-]*$
,
we would see the message defined in the errorMessage property:
#/payoutDefaults/compliance/reference: must be alphanumeric and can contain only the following special characters: /.-
.
It would be greatly appreciated if there’s already a way to override the default error message! 🙏
Metadata
Metadata
Assignees
Labels
No labels