J
Jennifer Mathews
For a RegularExpressionValidator I am using the following:
ErrorMessage="Department name length is between 3 & 20 characters and can alphanumeric, spaces, commas, periods or ?&#$%():;,._"
ValidationExpression="[?&#$%():;,._ 0-9a-zA-Z]{3,20}"
(Questionmark,Ampersand,pound,dollar,percent,(,),colon,semicolon,comma,period, and finally the underscore.)
It works fine.
Put I would like to include the "hyphen" character ( "-" ) and when I put it in after the "underscore" the validator crashes.
So the question is:
How can I include the "hyphen" as a valid character in the ValidationExpression?
Thanks
ErrorMessage="Department name length is between 3 & 20 characters and can alphanumeric, spaces, commas, periods or ?&#$%():;,._"
ValidationExpression="[?&#$%():;,._ 0-9a-zA-Z]{3,20}"
(Questionmark,Ampersand,pound,dollar,percent,(,),colon,semicolon,comma,period, and finally the underscore.)
It works fine.
Put I would like to include the "hyphen" character ( "-" ) and when I put it in after the "underscore" the validator crashes.
So the question is:
How can I include the "hyphen" as a valid character in the ValidationExpression?
Thanks