I created a custom jQuery Validate rule:
jQuery.validator.addMethod(
"regex",
function(value, element, regexp) {
var re = new RegExp(regexp);
return this.optional(element) || re.test(value);
},
"Please check your input."
);
And now would need regex to match only letters (in any language, especial Czech)
I tried
regex: "/^\pL++$/uD"
regex: "^\w*(\s\w*)?$"
None of these work. What would be the correct regex?