Validate against two field.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

I have two fields where the user is entering a length of time (minutes and
seconds) and need to validate it so that

a) they are both numbers.
b) If the minutes is 0, the seconds has to be > 10.

Is there an easy way to do this on the client side?

TIA - Jeff.
 
I have two fields where the user is entering a length of time (minutes and
seconds) and need to validate it so that

a) they are both numbers.
b) If the minutes is 0, the seconds has to be > 10.

Is there an easy way to do this on the client side?

Why not use the validator controls?





Jan Hyde (VB MVP)
 
Can I have a validator that checks the two fields together? I already have
the validator checking for numeric. I now need to check for if minute = 0,
seconds >= 10.
 
Can I have a validator that checks the two fields together? I already have
the validator checking for numeric. I now need to check for if minute = 0,
seconds >= 10.

Well if you use the custom validator you can run client
script to check anything you want. See the help topic for
"CustomValidator.ClientValidationFunction Property" for an
example.

J


Jan Hyde (VB MVP)
 
You'll need to use a CustomValidator.
Can I have a validator that checks the two fields together? I already have
the validator checking for numeric. I now need to check for if minute = 0,
seconds >= 10.
 
Back
Top