You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like right now the default error message on a pattern uses the pattern name (key), but it would be nice to have a separate error message for a couple of reasons:
It's nice to have the keys short and with no spaces in them. My case was wanting to validate a domain name, so ideally i'd have:
domainName = /some regex/
I ended up with:
'domain name' = /some regex/
which is okay except for the next problem:
It's really hard to localize (impossible really) since the key is used in the error
I could write a custom validator for this, but even the built in patterns I'd have to either write custom validators for or change the message to a generic "Field is not in correct format" or something like that.
I could write an extended pattern validator to do what I need too, but it seems like it might be functionality that other people would want.
Other than that, I love the library!
The text was updated successfully, but these errors were encountered:
It looks like right now the default error message on a pattern uses the pattern name (key), but it would be nice to have a separate error message for a couple of reasons:
domainName = /some regex/
I ended up with:
'domain name' = /some regex/
which is okay except for the next problem:
I could write a custom validator for this, but even the built in patterns I'd have to either write custom validators for or change the message to a generic "Field is not in correct format" or something like that.
I could write an extended pattern validator to do what I need too, but it seems like it might be functionality that other people would want.
Other than that, I love the library!
The text was updated successfully, but these errors were encountered: