A
antonyliu2002
I have a page that looks like this:
___txtbx1_____ [chkGT]< Your GPA [chkLT]< __txtbx2____
I am trying to implement user data validation.
None of the four controls is required. But I want to validate user
input according to the following logic.
1. If txtbx1 is filled, then it must pass a RangeValidator.
2. If txtbx1 is valid, then chkGT (i.e., checkbox Greater Than) must be
checked.
3. If chkGT is checked, then txtbx1 must be filled and be valid.
4. Similarly, if txtbx2 is filled, then it must pass a RangeValidator.
5. If txtbx2 is valid, then chkLT (i.e., checkbox Less Than) must be
checked.
6. If chkLT is checked, then txtbx2 must be filled and be valid.
7. If both txtbx1 and txtbx2 are valid, then both checkGT and chkLT
must be checked.
8. Vice versa, if both chkGT and chkLT are checked then both txtbx1 and
txtbx2 must be filled and be valid.
This sounds very scary to me. It sounds like it is a recursive check.
Is this logic implementable and how? Thanks.
___txtbx1_____ [chkGT]< Your GPA [chkLT]< __txtbx2____
I am trying to implement user data validation.
None of the four controls is required. But I want to validate user
input according to the following logic.
1. If txtbx1 is filled, then it must pass a RangeValidator.
2. If txtbx1 is valid, then chkGT (i.e., checkbox Greater Than) must be
checked.
3. If chkGT is checked, then txtbx1 must be filled and be valid.
4. Similarly, if txtbx2 is filled, then it must pass a RangeValidator.
5. If txtbx2 is valid, then chkLT (i.e., checkbox Less Than) must be
checked.
6. If chkLT is checked, then txtbx2 must be filled and be valid.
7. If both txtbx1 and txtbx2 are valid, then both checkGT and chkLT
must be checked.
8. Vice versa, if both chkGT and chkLT are checked then both txtbx1 and
txtbx2 must be filled and be valid.
This sounds very scary to me. It sounds like it is a recursive check.
Is this logic implementable and how? Thanks.