my regular expression is like,
// [RegularExpression("^[0-9]*$", ErrorMessage = "must be numeric")]
[RegularExpression("^[\u0660-\u0669]{10}$", ErrorMessage = "must be numeric")]
public Nullable<int> DecisionNumber { get; set; }
I am using one Regular expression at a time when i use first one [0-9] it works fine and only allow me to type english number 123... etc
But in second expression it allow me to type english number not arabic number. On english number it gives error must be number
How can i write expression for arabic number up to 10 digits.
Hopes for your reply
Try this
[RegularExpression("^[\u0660-\u0669]{1,10}$", ErrorMessage = "must be numeric")]
public string DecisionNumber { get; set; }
The ^[\u0660-\u0669]{1,10}$
regex will match 1 to 10 Arabic digits. The DecisionNumber
should be of type string.