Add support for Unicode property escapes in regex validation
KoshelevS opened this issue · 1 comments
KoshelevS commented
It looks like the library does not support Unicode property escapes like \p{L} in regex validation. Can we add this support.
I think we can change
match = new RegExp(params).exec(value);match = new RegExp(params[0], params[1]).exec(value);and
adapters.addSingleVal("regex", "pattern"); adapters.add("regex", ["pattern", "flags"], function (options) {
setValidationValues(options, "regex", [options.params.pattern, options.params.flags || ""]);
});to add this support.
Usage: <input type="text" data-val-regex-pattern="^[\p{L}]+$" data-val-regex-flags="u" value="asdf">
mkArtakMSFT commented
Hi. Thanks for contacting us.
We're closing this issue as there was not much community interest in this ask for quite a while now.
You can learn more about our triage process and how we handle issues by reading our Triage Process writeup.