I have created a controller with an update (PUT) request and applied regex on the id field as shown below but the pattern doesn't get executed and returning back SUCCESS instead of BAD\_REQUEST.

```
@PutMapping("users/{id}")
public Mono<ResponseEntity<UsersApiDTO>> update(@PathVariable @Pattern(regexp = "^[A-Za-z]{1,20}$") String id, @RequestBody @Valid UsersApiDTO usersApiDTO) {
    // return response
}

```

when I pass the wrong 'id' path field value "T001223242345" it is working. It should give me BAD\_REQUEST as it works for the request body like if I pass any invalid value for the body parameter it gives BAD\_REQUEST.

I have gone through many links and blogs but no luck yet.