JQuery validate: How to add a rule for regular expression validation?
- by PeterTheNiceGuy
I am new to JQuery and am using the JQuery validation plugin. Great stuff!
I want to migrate my existing ASP.NET solution to use JQuery instead of the ASP.NET validators. I am missing a replacement for the regular expression validator.
I want to be able to do something like this:
$("Textbox").rules("add", { regularExpression: "^[a-zA-Z'.\s]{1,40}$" })
Could anyone give me a hint how to add a custom rule to achieve this?