0

I had a problem with thymeleaf form and jakarta validation @Valid annotation and bindingResult - it didn't worked for me - I had always 0 errors

I spent a lot of time reading documentations, changing dependencies and more

Below my solution:

Michał Sułek
  • 278
  • 2
  • 11

1 Answers1

0

finally I figured it out to modify my model class (properties) from

class Translation(
  @NotEmpty(message = "err")
  key: String,
  @NotEmpty(message = "err") 
  en: String
)

to

class Translation() {
  @NotEmpty(message = "err")
  key: String = ""
  @NotEmpty(message = "err") 
  en: String = ""
}
Michał Sułek
  • 278
  • 2
  • 11