Jquery only Few special character validation
How can I validate all textbox on page with mentioned开发者_StackOverflow special characters on key up event using jquery.
Special characters should not allowed are: <>()"'/&
Can I have jquery validation on all textbox with regex?
Please help.
I did in .net with below lines of regex Dim StringPattern As String = "[<>()""'\&]" Dim RGXSafeString As New Regex(StringPattern) IsValidString = Not RGXSafeString.IsMatch(StringValue)
well there is a jQuery plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/ you can checkout demos of it over there too.
But since you are familiar with Regular Expression I suggest you to look for JavaScript Regular Expression over http://www.javascriptkit.com/javatutors/redev.shtml there are couple of more tuts in bottom too.
精彩评论