Just added the spring validation dependency:
implementation 'org.springframework.boot:spring-boot-starter-validation'
It's worked again.