Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
314
Validation of a custom user control
posted

Hi!

I have a form with some text editors and a custom made user control. This user control in turn has a couple of text editors of which one (lets's call it TextEditorA) is mandatory to fill in.

How do I set up validation of the form such that the validation result not only depends on the text editors of the form but also on TextEditorA in the user control?

If TextEditorA is not filled in I want the form validation to fail, and a fail indication at/of the TextEditorA (and not at/of the whole user control).

I currently have an UltraValidator in the user control that validates the mandatory text editor there. When clicking the mandatory text editor of the user control, but leaving it empty, the user control UltraValidator indicates that this text editor is not properly filled in. However the validation of the form does not fail. Can I make the UltraValidator of the form communicate with the UltraValidator of the user control? Should I expose some special property on the user control?