[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

help with validating password

Posted on 2006-05-02
4
Medium Priority
?
205 Views
Last Modified: 2009-12-16
I am creating an account creation page using asp.net 2.0/C#.

I need to validate the password field according to the following set of rules.

·        Must have at least six characters.
·        Can be a combination of following characters:
               Lower case chars: {abcdefghijklmnopqrstuvqxyz}
               Upper case chars: {ABCDEFGHIJKLMNOPQRSTUVWXYZ}
               Numbers:  {0123456789}
               Special Characters:  {!@#$%^*()-_=+;:,./?`~} (excluding the curly braces)

Please help me with the regex for RegularExpressionValidator.

Thanks.
0
Comment
Question by:IUAATech
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:pauljk1619
ID: 16590942
this requires 6 - 20 characters.  if you want more change the 20 at the end.

^([a-zA-Z0-9,\\,^,$,%,#,@,!,/?,&,*,(,),_,/=,/+,/,\-,],~){6,20}$
0
 

Author Comment

by:IUAATech
ID: 16590956
0
 

Author Comment

by:IUAATech
ID: 16590996
I pasted your solution in the 'ValidationExpression' property of the RegularExpressionValidator. It doesn't recognize a valid password. I tried passwd123.
0
 
LVL 7

Accepted Solution

by:
pauljk1619 earned 1000 total points
ID: 16591151
Sorry....

^([a-z,A-Z,\\,/,\-,\\,\^,$,%,#,@,\!,\?,&,*,(,),_,\=,\+,/,\-,~,0-9]){6,20}$
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question