Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regular expression

[RegularExpression(@"^[u0621-u064Au0660-u0669a-zA-Z]+$", ErrorMessage = "You can enter Arabic or English characters only")] 

[RegularExpression(@"^[0-9]+$", ErrorMessage = "You can enter numbers only")]

[RegularExpression(@"^[a-zA-Z-9]+$",ErrorMessage = "You can enter numbers or english characters only")]

[RegularExpression(@"^[u0621-u064Au0660-u0669-9]+$", ErrorMessage = "You can enter numbers or arabic characters only")]

[RegularExpression(@"^[u0621-u064Au0660-u0669]+$", ErrorMessage = "You can enter arabic characters only")]

[RegularExpression(@"^[a-zA-Z]+$",ErrorMessage = "You can enter english characters only")]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #regular #expression
ADD COMMENT
Topic
Name
3+5 =