This is a migrated thread and some comments may be shown as answers.

Regular Expression not working for RadInputManger?

1 Answer 46 Views
Input
This is a migrated thread and some comments may be shown as answers.
sam
Top achievements
Rank 1
sam asked on 17 Feb 2010, 05:14 PM
I probably have the regular expression set up wrong, but I am trying to set up a regular expression that checks if a password typed is between 7 and 16 characters and contains at least 1 numeric and 1 special character and not start with a digit. I tested this in some other regular expression testers and it passes, but I validation is failing when I do it with the RadInputManager.

I am using a RegExpTextBoxSetting with the following regular expression: /^(?=\D+\d)(?=.*[!@&.$#]).{7,16}$/

but the above displays a validation error even if I type a  password that is between 7 and 16 characters and contains at least 1 numeric and 1 special character.

I am new to regular expressions, so please excuse it.

Thanks,

1 Answer, 1 is accepted

Sort by
0
sam
Top achievements
Rank 1
answered on 17 Feb 2010, 08:33 PM
I got the answer.  I do not need to add the \ at the beginning and end of the expression for the ValidationExpression property.
Tags
Input
Asked by
sam
Top achievements
Rank 1
Answers by
sam
Top achievements
Rank 1
Share this question
or