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
85
Clear Validation Errors
posted

I am building a data entry form utilising the IsRequired property to validate the controls in a ValidationGroup.

Is it possible to clear all validation warnings on a form without fixing the root cause?   I would like to "clean the slate" so to speak without fixing the data, perhaps something like Me.UltraValidator1.Reset().

For example, if the user encounters validation warnings they have two options 1) Fix the errors 2) Discard the changes.   If the user chooses to discard the changes and open a new record I would like the form to be cleared of all validation warnings (return the form to the state before validation was called).

I have tried supressing the notifications by calling Me.UltraValidator1.Validate("Required", False, False) but this has not worked, the images are not cleared from the form.

It is possible to loop through the controls and change the validation settings, but I am hoping there is a more efficient method.

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    If the user is discarding changes, I would think you then roll back the values to whatever they were before the dialog session began, which are presumably valid. If you do that, and then call the Validate method, the error conditions will then be cleared.

Children
No Data