validation question

Discussion in 'ASP .Net' started by Ely, May 10, 2004.

  1. Ely

    Ely Guest

    When validating a control client side, is there a way to get the error
    message to display in the validation summary as soon as the control losses
    focus? Right now it only displays when the user clicks on the submit
    button.

    Thanks,
    Ely
     
    Ely, May 10, 2004
    #1
    1. Advertising

  2. Ely

    Rick Spiewak Guest

    Don't use a validator, write your own javascript and use the onblur event.

    "Ely" <> wrote in message
    news:e$...
    > When validating a control client side, is there a way to get the error
    > message to display in the validation summary as soon as the control losses
    > focus? Right now it only displays when the user clicks on the submit
    > button.
    >
    > Thanks,
    > Ely
    >
    >
     
    Rick Spiewak, May 11, 2004
    #2
    1. Advertising

  3. Ely

    Peter Blum Guest

    I'm not sure why you explicitly want the ValidationSummary to appear upon
    getting the first error. You can fake it in several ways.
    1. Put the validators in the location of the ValidationSummary control. Omit
    the ValidationSummary itself. This is still tricky due to formatting
    multiple messages.
    2. I wrote a replacement to Microsoft's validators to overcome its many
    limitations. "Professional Validation And More"
    (http://www.peterblum.com/vam/home.aspx) has several features that may help:
    - If you are putting error messages elsewhere because of screen realestate,
    my validators offer several "ErrorFormatters" that take up very little
    screen space: an image that pops up the error message via alert or tooltip;
    a hyperlink that shows an alert with the error message.
    - My ValidationSummary auto shows and hides error messages as the user
    edits. However, it doesn't show unless the user submits or you write one
    call to my javascript that is invoked as the page is loaded.
    - My CombinedErrorMessages control is a kind of mix between a
    ValidationSummary and normal validators. It lets you group a list of
    validators. They appear at the location of this control, like a
    ValidationSummary, but at the time the edit is made.

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx


    "Ely" <> wrote in message
    news:e$...
    > When validating a control client side, is there a way to get the error
    > message to display in the validation summary as soon as the control losses
    > focus? Right now it only displays when the user clicks on the submit
    > button.
    >
    > Thanks,
    > Ely
    >
    >
     
    Peter Blum, May 11, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,712
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,540
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    440
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,174
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. Lucas Tam
    Replies:
    2
    Views:
    1,139
    Lucas Tam
    Feb 26, 2004
Loading...

Share This Page