Custom Validation

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

    #1

    Custom Validation

    I have a web form that has a couple of input fields and a
    check box. One of the input fields is a required field,
    so I put a required field validator to validate that
    field.

    The second input field I only want to be required IF the
    user checks the checkbox. If the check box isn't checked
    I don't want the field to be required.

    Can somebody please help me figure out how I can
    accomplish this?

    Thanks,
    Jeremy
  • Sudha

    #2
    Re: Custom Validation

    You can do onething in the Checkbox CheckChanged event u check if its
    checked then u create aand assign RequiredFieldVa lidator for this field or
    else dont create and assign this validator to the field
    HTH






    "Jeremy" <Jknight12@NOho tmailSPAM.com> wrote in message
    news:085701c366 df$62d12640$a50 1280a@phx.gbl.. .[color=blue]
    > I have a web form that has a couple of input fields and a
    > check box. One of the input fields is a required field,
    > so I put a required field validator to validate that
    > field.
    >
    > The second input field I only want to be required IF the
    > user checks the checkbox. If the check box isn't checked
    > I don't want the field to be required.
    >
    > Can somebody please help me figure out how I can
    > accomplish this?
    >
    > Thanks,
    > Jeremy[/color]


    Comment

    Working...