BigDecimal, BigInteger, String, byte, short, int,long and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of Number.
BigDecimal, BigInteger, String, byte, short, int,long and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of Number.
BigDecimal, BigInteger, String, byte, short, int,long and the respective wrappers of the primitive types. Additionally supported by HV: any sub-type of Number.
校验整数位数和小数位数
对应的数据库表字段会被设置精度(precision)和准度(scale).
@Future
java.util.Date, java.util.Calendar; Additionally supported by HV, if the Joda Time date/time API is on the class path: any implementations of ReadablePartial and ReadableInstant.
检查给定的日期是否比现在晚.
没有
@Max
BigDecimal, BigInteger, byte, short, int, longand the respective wrappers of the primitive types. Additionally supported by HV: String(the numeric value represented by a String is evaluated), any sub-type of Number.
检查该值是否小于或等于约束条件中指定的最大值.
会给对应的数据库表字段添加一个check的约束条件.
@Min
BigDecimal, BigInteger, byte, short, int, longand the respective wrappers of the primitive types. Additionally supported by HV: String(the numeric value represented by a String is evaluated), any sub-type of Number.
检查该值是否大于或等于约束条件中规定的最小值.
会给对应的数据库表字段添加一个check的约束条件.
@NotNull
Any type
Checks that the annotated value is notnull.
对应的表字段不允许为null.
@Null
Any type
Checks that the annotated value is null.
没有
@Past
java.util.Date, java.util.Calendar; Additionally supported by HV, if the Joda Time date/time API is on the class path: any implementations of ReadablePartial and ReadableInstant.
BigDecimal,BigInteger,String, byte,short, int,long and the respective wrappers of the primitive types
判断数值的范围,不仅支持数值类型,还支持字符串、字节等等类型
没有
@SafeHtml(whitelistType=, additionalTags=)
CharSequence
无使用价值
没有
@ScriptAssert(lang=, script=, alias=)
Any type
无使用价值
没有
@URL(protocol=, host=, port=, regexp=, flags=)
String
Checks if the annotated string is a valid URL according to RFC2396. If any of the optional parameters protocol, host or port are specified, the corresponding URL fragments must match the specified values. The optional parametersregexp and flags allow to specify an additional regular expression (including regular expression flags) which the URL must match.