Ver Fonte

fix: 注册密码没有验证,现在改为8-30位大小写英文字母数字字符串

370774330@qq.com há 5 anos atrás
pai
commit
85db203ceb

+ 3 - 0
seecoder-portal-common/src/main/java/cn/seecoder/seecoderportalcommon/vo/dto/RegisterDTO.java

@@ -2,11 +2,14 @@ package cn.seecoder.seecoderportalcommon.vo.dto;
 
 import cn.seecoder.seecoderportalcommon.vo.UserVO;
 
+import javax.validation.constraints.Pattern;
+
 /**
  * @author kunduin
  */
 public class RegisterDTO extends UserVO {
 
+    @Pattern(regexp = "^([a-z]|[A-Z]|[0-9]){8,30}$", message = "密码只能由打小写英文字母数组组成,长度为8-30")
     private String password;
 
     private String identifyCode;