Git Product home page Git Product logo

Comments (5)

towelong avatar towelong commented on August 16, 2024

phone那里用的@max注解,导致无法正常注册

`@Data @NoArgsConstructor @EqualField(srcField = "password", dstField = "confirmPassword", message = "{password.equal-field}") public class RegisterDTO {

@NotBlank(message = "{username.not-blank}")
@Length(min = 2, max = 10, message = "{username.length}")
private String username;

private List<Integer> groupIds;

@Email(message = "{email}")
private String email;

@NotBlank(message = "{password.new.not-blank}")
@Pattern(regexp = "^[A-Za-z0-9_*&$#@]{6,22}$", message = "{password.new.pattern}")
private String password;

@NotBlank(message = "{password.confirm.not-blank}")
private String confirmPassword;

@Max(value = 30)
private String phone;

}`

image
麻烦请再学习下这部分的内容(Hibernate Validator)

from lin-cms-spring-boot.

yours520 avatar yours520 commented on August 16, 2024

from lin-cms-spring-boot.

towelong avatar towelong commented on August 16, 2024

对啊,这个max注解不是你们框架加的吗,只能用在数字上,你们用在字符串上了 发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: WeLong @.> 发送时间: 2021年11月14日 11:14 收件人: TaleLin/lin-cms-spring-boot @.> 抄送: yours520 @.>, Author @.> 主题: 回复:[TaleLin/lin-cms-spring-boot] 用户注册的bug (#252) @.注解,导致无法正常注册 @. @NoArgsConstructor @EqualField(srcField = "password", dstField = "confirmPassword", message = "{password.equal-field}") public class RegisterDTO { @notblank(message = "{username.not-blank}") @Length(min = 2, max = 10, message = "{username.length}") private String username; private List<Integer> groupIds; @Email(message = "{email}") private String email; @notblank(message = "{password.new.not-blank}") @pattern(regexp = "^[A-Za-z0-9_*&$#@]{6,22}$", message = "{password.new.pattern}") private String password; @notblank(message = "{password.confirm.not-blank}") private String confirmPassword; @max(value = 30) private String phone; }` 麻烦请再学习下这部分的内容(Hibernate Validator) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

image
没有啊,请问你用的是最新版本吗

from lin-cms-spring-boot.

towelong avatar towelong commented on August 16, 2024

image
数据库里面我们也没有这个字段的,你看看git记录,应该是你自己加的吧

from lin-cms-spring-boot.

yours520 avatar yours520 commented on August 16, 2024

from lin-cms-spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.