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
1180
conditional validation
posted

i need to validate a form but I do not know how.
If a certain object is visible that I need
textbox x, y and z is required otherwise the textbox a, b and c is required

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello miguelsneto,

    I prepared a sample for your scenario and attached it to this post.

    If the button which says "Validate!" on my form is visible, the text boxes in 'groupBox2' are required, if it is hidden then the text boxes in the first group box are required. If a text box which is required is not valid, the form could not be closed.

    I am validating only on value changed in the optionSet(which is used to show and hide the button) and on clicking the ultraButton control. So these are the options to validate the form.

    Please feel free to let me know if I misunderstood you. I also will be glad to assist you if you have any other questions.

    ValidateForm.zip
Children