The error returned when a field that is validated ...
# ory-network
r
The error returned when a field that is validated via a regex pattern does not match the pattern is not user friendly at all
does not match pattern "^[A-Za-z0-9_]{4,20}$"
. Do you think that adding something like a
pattern-description
field in the identity schema to return a more user friendly error could make sense?
s
We recommend to implement error customization on the client side, see https://www.ory.sh/docs/kratos/concepts/ui-user-interface#titles-labels--validation-messages
r
Got it, in that case, I guess the error could still have a concrete case where it provides a context with the pattern, at the moment is using:
Copy code
{
    "id": 4000001,
    "text": "{reason}",
    "type": "error"
  },
s
true, we are working on that https://github.com/ory/kratos/issues/2974
❤️ 1