Range Validator isn't working properly

Last post 12-03-2007 3:26 PM by mychucky. 2 replies.

Sort Posts:

  • Range Validator isn't working properly

    11-30-2007, 3:46 PM
    • Contributor
      3,377 point Contributor
    • mychucky
    • Member since 03-20-2006, 5:01 PM
    • Posts 2,530

    I don't think the Range Validator is working properly. I have a textbox I specified the minimum to be 1 and maximum value to 150 characters on the Range Validator; however, when I run the application on the web browser, I enter a 64 characters into this textbox and the range validator is giving me the error message. Why is this?

  • Re: Range Validator isn't working properly

    11-30-2007, 4:14 PM
    Answer

    Doesn't the range validator validate the range value wise not character wise?

    Your problem seems solvable by having a requiredfieldvalidator and a MaxLength="150" on the textbox.

    Please correct me if I'm wrong

  • Re: Range Validator isn't working properly

    12-03-2007, 3:26 PM
    • Contributor
      3,377 point Contributor
    • mychucky
    • Member since 03-20-2006, 5:01 PM
    • Posts 2,530

    I know I can use the MaxLength property of the textbox but I thought the range validator validates the character wise. Maybe I'm wrong.

     

    Thanks! 

Page 1 of 1 (3 items)