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?
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?