Hello,
Earlier my text box was running on this Validation Expression="^[a-zA-Z'.\s-]{1,80}$", to allow only alphabets, ' . \s .
Now my text box should be capable of taking Chinese characters as well, so I was learnt online to use this \p{L} for unicode instead of a-zA-Z, and set EnableClientScript="false".
asp:RegularExpressionValidator ID="regexpName" runat="server" CssClass="failureNotification" ErrorMessage="No Special Characters allowed"
ControlToValidate="txtName" ValidationExpression="^[\p{L}'.\s-]{1,80}$" Display="Dynamic" meta:resourcekey="regexpNameResource1" EnableClientScript="false"
I have done both, but it doesn't work. My input values were like
1. John123
2. 汉语%^&
Both of these were accepted without any errors. But I expect only alphabets in english and chinese and ' . \s - to be accepted as Name input.
Can anyone suggest me correct way to handle this?
Thanks,