CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Location
    Michigan
    Posts
    2,222

    ASP.NET validation control

    Hey I need a regular expression for a validation control on my password field:

    Requirements
    Must contain 1 digit
    Entire password must be 6-10 digits

    I have tried this, this ensures 1 digit, but how do I incorporate the length?
    ^(\w*(?=\w*\d)\w*)$

    Any help greatly appreciated.

  2. #2
    Join Date
    Feb 2002
    Location
    Mumbai, India
    Posts
    242

    Re: ASP.NET validation control

    try the length property of the string in javascript
    Hope this helps. If it does, then rate it.
    ----
    Rohit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured