<asp:TextBox runat="server" ID="txtMediumPassword" /> <asp:RegularExpressionValidator runat="server" ErrorMessage="Password should contain minimum 7 non repetitive characters" ControlToValidate="txtMediumPassword" ID="RegularExpressionValidator1" ValidationExpression="^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$" /> <asp:TextBox runat="server" ID="txtStrongPassword" /> <asp:RegularExpressionValidator runat="server" ErrorMessage=" Password should contain minimum 8 non repetitive characters, at least 1 Uppercase character, at least 1 lowercase character and at least 1 digit." ControlToValidate="txtStrongPassword" ID="regexPassword" ValidationExpression="^(?=.{8,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9])))(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).*$" />
Tuesday, August 10, 2010
How to validate password strength using regular expression
Please note: code being formatted for the demonstration purposes.
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment