mandatory text fields

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Srinivas

    mandatory text fields

    Hi,

    If a textbox is being validated using a required field validator then we
    need to key in some text before sumbmitting the form. But if we key in a
    space character this gets validated to true and the form gets submitted. I
    want to make sure that the user enters some text and submit the form, and
    not just enter a space character and submitting the form.

    Any ideas how to achieve this.

    Thanks,

    Srinivas


  • Karl Seguin

    #2
    Re: mandatory text fields

    Srinivas:
    You could certainly achieve what you are looking for with a mix of a
    RequiredFieldVa lidator as well as a RegularExpressi onValidator...I 'd give
    you a regular expression, but what's your meaning of "some text" ??
    Numbers? Letters? Punctuation? Anything non space?

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
    http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
    come!)


    "Srinivas" <no.spam@email. com> wrote in message
    news:eiibddsLFH A.4092@tk2msftn gp13.phx.gbl...[color=blue]
    > Hi,
    >
    > If a textbox is being validated using a required field validator then we
    > need to key in some text before sumbmitting the form. But if we key in a
    > space character this gets validated to true and the form gets submitted. I
    > want to make sure that the user enters some text and submit the form, and
    > not just enter a space character and submitting the form.
    >
    > Any ideas how to achieve this.
    >
    > Thanks,
    >
    > Srinivas
    >
    >[/color]


    Comment

    Working...