I'm using the following validation for fax numbers:
[RegularExpression(@"^\+[0-9]{1,3}\([0-9]{3}\)[0-9]{7}$", ErrorMessage = "This is not a valid fax number.")]
But the fax number form entry does not accept any input.
I'm using the following validation for fax numbers:
[RegularExpression(@"^\+[0-9]{1,3}\([0-9]{3}\)[0-9]{7}$", ErrorMessage = "This is not a valid fax number.")]
But the fax number form entry does not accept any input.
Try this;
\+[0-9]{1,3}\([0-9]{3}\)[0-9]{7}
Sample outputs;
+895(194)6165163
+09(155)2541778
You don't need to use ^
for this. It means "except".
^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$
Try this........