Hibernate-validator 7.x not validating

It’s entirely possible this is a me problem, but from what I can tell at the moment it doesn’t seem that validation annotations are working. I’m using springboot 2.6.7 with kotlin 1.6.21 and hibernate-validator 7.0.4. Some sample code that I’m using:

// Gradle

// Spring RestController
    fun test(@Valid @RequestBody data: Data, errors: Errors) : ResponseEntity<Any> {
        return if (errors.hasErrors()) {
            ResponseEntity(errors.allErrors, HttpStatus.BAD_REQUEST)
        } else {
            ResponseEntity(data, HttpStatus.ACCEPTED)

// Kotlin POJO
class Data(
    @get:NotNull(message = "First name cannot be null")
    var firstName: String?,
    @get:Pattern(regexp = "Y|N", message = "Last name must be a Y or N")
    var lastName: String

No errors are returned when the validation rules are broken. Sending in a last name of “test” or a null firstname has no issues. I’ve tried changing @get@field too. However, if I implement a custom validator and then call DataValidator().validate(data, errors) on the data POJO the errors are then returned properly.
I’ve also downgraded hibernate validator to 6.0.2-FINAL and the validation works properly with only the annotations.
Am I missing something here?

After some research, it appears that this is likely a jakarta EE compatibility issue. Spring framework is only supporting EE8 at the moment. Hibernate validator 7.X requires EE9+ with the 3.0 bean spec. Sticking with validator 6.x is the way to go until Spring6 is released.