Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6790377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:43:06+00:00 2026-05-26T17:43:06+00:00

I have a web form to submit a new user details. In that for

  • 0

I have a web form to submit a new user details. In that for password field, a textbox is used.
Validation is required for that as ‘it shold contain min 8 characters with atleast one non-alphanumeric character’. I’m providing validation for it in web config file as:-

<membership defaultProvider="SQLMembershipProvider">
  <providers>
      <remove name="SQLMembershipProvider"/>
        <add name="SQLMembershipProvider" connectionStringName="DAFEConnection" minRequiredPasswordLength="8" minRequiredNonalphanumericCharacters="1"   type="System.Web.Security.SqlMembershipProvider" applicationName="WBCPDA" requiresQuestionAndAnswer="false" enablePasswordReset="true" maxInvalidPasswordAttempts="4" passwordAttemptWindow="15" requiresUniqueEmail="true"/>
            </providers>
        </membership>

This validation is triggered on server side, i.e. when I click ‘submit’ button.
I WANT TO VALIDATE THE SAME AT CLIENT-SIDE, i.e. as soon as he enters a non-desired value in text-box.

PLZ help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:43:07+00:00Added an answer on May 26, 2026 at 5:43 pm

    The quickest way to do this would be using a Regular Expression Validator. See documentation here.

    Kangkan’s suggestion is very good; not only the idea to use jQuery for this; but mostly the idea of using a regular expression to validate that the password is in the expected format.

    Additional answer:

    It’s difficult The quickest way to give you exact code that will work for your case since you didn’t provide markup; but you could do something similar to this :

    <asp:button id="btnSubmit" runat="server" OnClientClick="return validate_pass();" OnClick="YourHandler" />
    

    And would be using a javascript function .Regular Expression Validator. See documentation here.

    function validate_pass()
    {
        //txtPassword is assumed to be the id of the password text field on your page
        var passField = document.getElementById('<%=txtPassword.ClientID%>');
        if(passField.value.length<8)
        {  
           alert('Password must contain at least 8 characters');
           return false; 
        }
        return true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web form where I have a textbox in which the user
I have a asp.net web form which will submit information to come as emails.
I have a simple web app: a web page with a form to submit,
I have a web form that collects information and submits it to a cgi
I have a web form that binds a DataGrid to a, normally, different data
I have a web form that has multiple ListBoxes, TextBoxes, DropDowns. If I put
I have a web form that I am attempting to implement dynamic drop down
I have a web form that manipulates records in a MySQL database. I have
I have a web form that has 2 radio buttons, depending on which one
I have a form on a simple web page that has a series of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.