Reg. CustomValidator Behaviour

  • Thread starter Thread starter Madhu [MVP]
  • Start date Start date
M

Madhu [MVP]

Hi,

I have a custom validator in the page along with required
validator and compare validator. I also have the
validation summary.

I am using Client side validation for the custom
validator.

The required field validator and the compare validator
fires sequentialy i.e., if fires only if the other has
left the page valid. But the custom validator fires even
if page is invalid.

I want my custom validator to fire only if the other
validators in the page are valid.

Any help is highly appreciated.

Thanks.

Regards,
Madhu

MVP | MCSD.NET
 
AFAIR args.IsValid in clients side validators is not preserved during each
validator call, best workaround is to keep additional javascript variable,
and store Page_IsValid value, and just return at the beginning of the
validator, if this variable is not true

HTH
 
Back
Top