You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Added OneOf annotation and constraint details in BuiltinConstraint, ConstraintHelper, TypeNames.
2. Added OneOfDef and its unit test.
3. Added documentation in ch02.asciidoc.
4. Updated OneOf constraints to accept different array data types like int, long, float and double.
5. Updated OneOfValidator to map to Object instead of CharSequence so that it can be used on fields with Integer, Long, Float, Double and String types.
6. Added detailed unit tests for OneOf in OneOfValidatorTest.
7. Added validation messages for OneOf message code or key in ValidationMessages_[LOCALE].properties files.
Copy file name to clipboardExpand all lines: documentation/src/main/asciidoc/ch02.asciidoc
+4
Original file line number
Diff line number
Diff line change
@@ -711,6 +711,10 @@ With one exception also these constraints apply to the field/property level, onl
711
711
Supported data types::: `CharSequence`
712
712
Hibernate metadata impact::: None
713
713
714
+
`@OneOf`:: Checks that the annotated character sequence or object is one of the allowed values. The allowed values are defined using `allowedValues`, `allowedIntegers`, `allowedLongs`, `allowedFloats`, `allowedDoubles` or by specifying an `enumClass`. The validation occurs after converting the annotated object to a `String`.
715
+
Supported data types::: `CharSequence`, `Integer`, `Long`, `Float`, `Double`, `Enum`
716
+
Hibernate metadata impact::: None
717
+
714
718
`@Range(min=, max=)`:: Checks whether the annotated value lies between (inclusive) the specified minimum and maximum
715
719
Supported data types::: `BigDecimal`, `BigInteger`, `CharSequence`, `byte`, `short`, `int`, `long` and the respective wrappers of the primitive types
org.hibernate.validator.constraints.LuhnCheck.message = kontroln\u00ed \u010d\u00edslice pro ${validatedValue} je neplatn\u00e1, kontroln\u00ed sou\u010det Luhn Modulo 10 se nezda\u0159il
31
31
org.hibernate.validator.constraints.Mod10Check.message = kontroln\u00ed \u010d\u00edslice pro ${validatedValue} je neplatn\u00e1, kontroln\u00ed sou\u010det Modulo 10 se nezda\u0159il
32
32
org.hibernate.validator.constraints.Mod11Check.message = kontroln\u00ed \u010d\u00edslice pro ${validatedValue} je neplatn\u00e1, kontroln\u00ed sou\u010det Modulo 11 se nezda\u0159il
33
+
org.hibernate.validator.constraints.OneOf.message = neplatn\u00e1 hodnota
33
34
org.hibernate.validator.constraints.ParametersScriptAssert.message = v\u00fdraz skriptu "{script}" se nevyhodnotil na true
34
35
org.hibernate.validator.constraints.Range.message = mus\u00ed le\u017eet v rozsahu {min} a\u017e {max}
35
36
org.hibernate.validator.constraints.ScriptAssert.message = v\u00fdraz skriptu "{script}" se nevyhodnotil na true
0 commit comments