The logic behind webforms validation will never cease to amaze me.

First we have the checkbox, which is not a "validatable" control. You either have to roll out your own Validator subclass to validate a checkbox (e.g. "you must agree to the terms and conditions to proceed"), or you have to use a custom validator, without ControlToValidate field, and roll your own server AND client side logic for the validation. And let's not forget that you must explicitly tell the CustomValidator that you want to validate empty values...

I've just encountered an issue with a pair of textboxes: email and email confirmation. The page had a RequiredFieldValidator on the Email field and a CompareValidator on the EmailConfirmation field, with ControlToCompare being the Email field and operator being "equal".

The validator does not trigger if the ControlToValidate (in our case, the email confirmation field) does not contain a value...

An easy solution for my case was to switch the ControlToValidate and ControlToCompare. So both validators now validate the Email field. If you do not type any value in the Email field, the RequiredFieldValidator kicks in. If you do type a value and leave the confirmation field empty, then the CompareValidator kicks in and since the email field DOES have a value, it triggers the comparison (and returns as invalid, correctly).

Took me about an hour to figure this out...