Closed javier-godoy closed 2 years ago
This feature could be really useful to, as you said, present errors to the user in a nice way.
It could be helpful that the validation mechanism could return a list of validation errors like services that implement ValidationSupport
does, but I can't see where the validations should be triggered.
I can't see where the validations should be triggered.
If you are using Binder, they can be bean-level validation with Binder
. Otherwise, just call the validation when you see fit, and you'll known whether the bean is valid (e.g. if it's "insertable") without actually invoking the service operation.
That is a good option if Vaadin is being used, but my comment was pointed to that Commons Backend can be used with a different frontend technology
From the presentation layer I want to run service validations before actually saving an item, so that I'm able to display validation errors in advance.