validate email and phone in create user wizard control

Last post 05-09-2008 8:29 AM by anncao. 6 replies.

Sort Posts:

  • validate email and phone in create user wizard control

    05-07-2008, 5:15 PM
    • Loading...
    • anncao
    • Joined on 04-27-2006, 1:42 PM
    • Posts 136

    I use createUserWizard create a registration page. But I add phone, also I add regular expression validator for email and phone. But it seems they are not working.

    After I enter those information, and hit create user, it goes successfully even I entered wrong email and phone format.

    What could be wrong? Thanks

  • Re: validate email and phone in create user wizard control

    05-07-2008, 8:28 PM
    Answer
    • Loading...
    • aspro
    • Joined on 04-15-2008, 1:29 AM
    • Australia
    • Posts 24

    Make sure your validation group of the email and phone is linked to the same group as the existing wizard validation which is usually the name of the CreateUserWizard.

    aspro. 

    Please mark your posts as answered and thank the asp gods of the forum
  • Re: validate email and phone in create user wizard control

    05-08-2008, 8:59 AM
    • Loading...
    • anncao
    • Joined on 04-27-2006, 1:42 PM
    • Posts 136

    Thank you. Most of my validation work now. But for the password it still not working. I setup in web.config file that it's minum length for password is 4, but I hit create user, it will not give any error message, but only clear password and confirm password field, then let me enter again. Is there a way I setup the error message to show you must enter a password at least 4 characters.

    Here are the part in the web.config file.

    <membership>

    <providers>

    <remove name="AspNetSqlMembershipProvider" />

    <add name="AspNetSqlMembershipProvider"

    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    connectionStringName="MyConnection"

    enablePasswordRetrieval="true"

    requiresQuestionAndAnswer="false"

    applicationName="/"

    requiresUniqueEmail="false"

    minRequiredPasswordLength="4"

    minRequiredNonalphanumericCharacters="0"

    passwordFormat="Clear"

    maxInvalidPasswordAttempts="8"

    passwordAttemptWindow="10"

    passwordStrengthRegularExpression="" />

    </providers>

    </membership>

  • Re: validate email and phone in create user wizard control

    05-08-2008, 9:14 AM
    • Loading...
    • rbansal44
    • Joined on 12-11-2007, 10:09 AM
    • Posts 89

    hi,

    it's working.....i have just tried your web.config code and when i am creating new user and i have set minRequiredPasswordLength="3".it's giving me an error message as

    Password length minimum: 4. Non-alphanumeric characters required: 1.
    // //

    thanks,

    rajiv

  • Re: validate email and phone in create user wizard control

    05-08-2008, 9:23 AM
    • Loading...
    • anncao
    • Joined on 04-27-2006, 1:42 PM
    • Posts 136

    I know you must use CreateUserWizard itself, without changing anything, but I customized the create user step, because I want to add first name and last name, phone.

    And after that, when hit create user, if I entered a 3 character password, it will clear out password and confirm password fields, and let me enter again, but no any error message shown.

    How can I make the error message show?

  • Re: validate email and phone in create user wizard control

    05-08-2008, 7:59 PM
    • Loading...
    • aspro
    • Joined on 04-15-2008, 1:29 AM
    • Australia
    • Posts 24

    Post your aspx code for the CreateUser and I will have a look. I always use the templated versions of CreateUser and haven't had any problems with the existing validation. I think you will find that you may have accidentally changed something. What might be quicker (since we are in different timezones ) is that you create another wizard on the page (or a new page) and convert it to a template but don't add any new  fields to it. Test it out with your webconfig stuff and make sure it works, then just compare your 2 wizards and make sure all of the names and validation code for the password fields are the same. That should pin point your problem. I just tested your webconfig out with a templated wizard and it all works fine.

    aspro 

    Please mark your posts as answered and thank the asp gods of the forum
  • Re: validate email and phone in create user wizard control

    05-09-2008, 8:29 AM
    • Loading...
    • anncao
    • Joined on 04-27-2006, 1:42 PM
    • Posts 136

     

    Thank you very much for keeping work on it. I just found out I took off the literal error message which was orginally in CreateUserWizard. I thought it was just a place holder.

    Now it works. Thank you

Page 1 of 1 (7 items)