7

JSR-303 Bean Validation - @Size和@Max@Min的区别

 3 years ago
source link: http://www.blogjava.net/paulwong/archive/2021/04/29/435867.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
JSR-303 Bean Validation

My Links

Blog Stats

  • Posts - 1067
  • Stories - 10
  • Comments - 108
  • Trackbacks - 0

留言簿(43)

随笔分类(1229)

随笔档案(1022)

文章分类(7)

文章档案(10)

收藏夹(2)

Develop

E-BOOK

Other

阅读排行榜

评论排行榜

60天内阅读排行

JSR-303 Bean Validation - @Size和@Max@Min的区别

@Min and @Max are used for validating numeric fields which could be String(representing number), intshortbyte etc and their respective primitive wrappers.

@Size is used to check the length constraints on the fields.

As per documentation @Size supports StringCollectionMap and arrays while @Min and @Max supports primitives and their wrappers. See the documentation.

posted on 2021-04-29 09:55 paulwong 阅读(6) 评论(0)  编辑  收藏 所属分类: J2SE

Powered by:
BlogJava
Copyright © paulwong


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK