cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
26 stars 45 forks source link

Running validation in arbitrary screen is not described #739

Closed alexbudarov closed 3 years ago

alexbudarov commented 4 years ago

Description of the bug or enhancement

Searching documentation by "valid", "validate", "validation" does not return any results about running validation in arbitrary screen that has some input components or form.

E.g. this forum topic: https://www.cuba-platform.com/discuss/t/check-if-form-is-valid/13251

As far as I know, generally the com.haulmont.cuba.gui.screen.ScreenValidation bean should be used to run validation in screens. It's not mentioned in docs.

We can give an example, how to obtain ScreenValidation and how to use it to validate some components (or all components in the screen), showing validation errors if there are any and proceeding with the screen logic if screen is valid.