extending the RegularExpressionValidator

T

Tomk

I would like to have a RegularExpressionValidator that would also require an
entry. So I opened Reflector and looked at the RegularExpressionValidator
control and found the EvaluateIsValid function. In this function it returns
a true if the ControlToValidate is empty. OK so my thought was to extend
this control, add a 'Required' property and override the EvaluateIsValid
function. Then return false if the 'Required' property is set and the
ControlToValidate is empty. This all seem to work just fine and on my test
program it seemed to work. However in real practice I found that if the
ControlToValidate was empty the form was still submitted. So is seems I
have to dig into the JScript generated by the control. Am I going in the
right direction? What do I override to change the JScript?
 

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,780
Messages
2,569,608
Members
45,249
Latest member
KattieCort

Latest Threads

Top