Reg. CustomValidator Behaviour

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
 
K

Konrad Rotuski

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top