How to make vaadin validation with java validation api this is my code below

maybie without declare each component ui

just declare once

@nifty-tasmanian have you checked out the bean validator API?

the tutorial should have Form Layout sir, but i dont have that

the constraintviolation objects should have enough information for you to set the appropriate condition on your field objects

so that, we need FormLayout for making validation sir?

 val validation = registrationBinder.validate();

              if (validation.isOk()) {
              } else {
                        error -> {
                          val field = error.getField();
                          if (field instanceof HasValidation hv) {

You don’t need a form layout–all of your fields should implement HasValidation and you can just use something like that ^^ to set the messages