Need a feature for customizing error message.
i.e. in string type, match constraint will return error message "must match the pattern %{regex}".
But, showing regex in user interface is not a good experience for users.
I need to customize error messages.
3 Replies
Zach already gave the OK on adding that feature: https://discord.com/channels/711271361523351632/712035333432147989/1088140734634401935
I got sidetracked on it though, would be good if you could put together an issue for it so we can track the feature. 😄
In the meantime you can remove the constraint from the attribute and add the validation:
validate match(:field, ~r//), message: "must be a valid something"
Oh, I missed
validations
feature in resource. I'll use it for now. Thanks.