我有这样的端点:
@PostMapping("/phone-number")
public ConfirmableResponse<String> createPhoneNumberVerificationRequest(@RequestBody @NotBlank @Size(min = 1, max = 20) String phoneNumber) {
...
但是正如我所见,注释@Size不起作用。为什么?怎样用@ Pattern注释验证phoneNumber?
@Valid
批注进行验证。