내가 암호 필드를 검증하기 위해 스트럿 2 주석 유효성 검사를 사용하고 있지만, 난 내 코딩에게 올바른 줄 whwn이 오류가 표시가정규식 하나 캐피탈, 하나 개의 숫자 최소 7 최대 15 자
@RequiredStringValidator(message = "Please provide a password")
@StringLengthFieldValidator(minLength="7",maxLength="15",message="The Password should be minmum 7 character and maximum 15 charcters")
@RegexFieldValidator(expression = "^[0-9A-Z]+$", message = "Password atleast have one Capital and one Number")
입니다
어떤 아이디어?
암호에 대한 요구 사항이 변경되면 (그리고 요구 사항이 결국 변경됩니다) 규칙을 수정하는 것이 정규식에 모두 들어간 경우와는 별도로 수행하는 것이 더 쉽습니다. – Danack