I have a problem..I need to allow following characters ( space, hyphen -, forward slash /, back slash\, apostrophe'
) in my textbox and validations has to pass. I achieved through regular expressions. Whether these special characters occurs single time or multiple times.
<RegularExpressionValidator ValidationExpression="^([a-zA-Z0-9,\#])*([a-zA-Z0-9,\-\.\s\#\|\'\\])*$" ErrorMessageID="Validate.MyProfile.Address1.ValidCharacters" />
However, the problem is..I have to allow all these characters only one time
in the textbox. Multiple occurences are NOT
allowed in the future. Please help me fix this problem.