Skip to content

Commit 9f30894

Browse files
author
Yusuf Alamu Musa
committed
HV-2073 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.
1 parent b29d458 commit 9f30894

37 files changed

+709
-144
lines changed

Diff for: annotation-processor/src/main/java/org/hibernate/validator/ap/internal/util/ConstraintHelper.java

+1
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ public ConstraintHelper(Types typeUtils, AnnotationApiHelper annotationApiHelper
307307
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NOT_BLANK, CharSequence.class );
308308
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NOT_EMPTY, TYPES_SUPPORTED_BY_SIZE_AND_NOT_EMPTY_ANNOTATIONS );
309309
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NORMALIZED, CharSequence.class );
310+
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.ONE_OF, Object.class );
310311
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.SCRIPT_ASSERT, Object.class );
311312
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.UNIQUE_ELEMENTS, Collection.class );
312313
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.URL, CharSequence.class );

Diff for: annotation-processor/src/main/java/org/hibernate/validator/ap/internal/util/TypeNames.java

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public static class HibernateValidatorTypes {
8585
public static final String UUID = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".UUID";
8686
public static final String NOT_BLANK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".NotBlank";
8787
public static final String NOT_EMPTY = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".NotEmpty";
88+
public static final String ONE_OF = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".OneOf";
8889
public static final String SCRIPT_ASSERT = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".ScriptAssert";
8990
public static final String UNIQUE_ELEMENTS = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".UniqueElements";
9091
public static final String URL = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".URL";

Diff for: documentation/src/main/asciidoc/ch02.asciidoc

+4
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,10 @@ With one exception also these constraints apply to the field/property level, onl
711711
Supported data types::: `CharSequence`
712712
Hibernate metadata impact::: None
713713

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+
714718
`@Range(min=, max=)`:: Checks whether the annotated value lies between (inclusive) the specified minimum and maximum
715719
Supported data types::: `BigDecimal`, `BigInteger`, `CharSequence`, `byte`, `short`, `int`, `long` and the respective wrappers of the primitive types
716720
Hibernate metadata impact::: None
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
5+
package org.hibernate.validator.cfg.defs;
6+
7+
import org.hibernate.validator.cfg.ConstraintDef;
8+
import org.hibernate.validator.constraints.OneOf;
9+
10+
public class OneOfDef extends ConstraintDef<OneOfDef, OneOf> {
11+
12+
public OneOfDef() {
13+
super( OneOf.class );
14+
}
15+
16+
public OneOfDef enumClass(Class<? extends Enum<?>> enumClass) {
17+
addParameter( "enumClass", enumClass );
18+
return this;
19+
}
20+
21+
public OneOfDef allowedIntegers(int[] allowedIntegers) {
22+
addParameter( "allowedIntegers", allowedIntegers );
23+
return this;
24+
}
25+
26+
public OneOfDef allowedLongs(long[] allowedLongs) {
27+
addParameter( "allowedLongs", allowedLongs );
28+
return this;
29+
}
30+
31+
public OneOfDef allowedFloats(float[] allowedFloats) {
32+
addParameter( "allowedFloats", allowedFloats );
33+
return this;
34+
}
35+
36+
public OneOfDef allowedDoubles(double[] allowedDoubles) {
37+
addParameter( "allowedDoubles", allowedDoubles );
38+
return this;
39+
}
40+
41+
public OneOfDef allowedValues(String[] allowedValues) {
42+
addParameter( "allowedValues", allowedValues );
43+
return this;
44+
}
45+
}

Diff for: engine/src/main/java/org/hibernate/validator/constraints/OneOf.java

+46-10
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,61 @@
1414
import jakarta.validation.Constraint;
1515
import jakarta.validation.Payload;
1616

17-
import org.hibernate.validator.internal.constraintvalidators.bv.OneOfValidator;
18-
17+
/**
18+
* Annotation to specify that a field or parameter must be one of a defined set of values.
19+
* This can be enforced using string, integer, float, or double values, or by restricting the values to those
20+
* within an enum type.
21+
*
22+
* <p> For string values, the annotation supports case-insensitive matching. </p>
23+
*
24+
* <p> Usage example: </p>
25+
* <pre>{@code
26+
* @OneOf(allowedValues = {"ACTIVE", "INACTIVE"}, ignoreCase = true)
27+
* private String status;
28+
* }</pre>
29+
*
30+
* <p>The message attribute provides a customizable error message when validation fails. The groups and payload
31+
* attributes allow the validation to be applied to specific validation groups or custom payload types.</p>
32+
*
33+
* <p> You can use the following fields in the annotation: </p>
34+
* <ul>
35+
* <li><code>allowedIntegers</code>: A set of allowed integer values.</li>
36+
* <li><code>allowedLongs</code>: A set of allowed long values.</li>
37+
* <li><code>allowedFloats</code>: A set of allowed float values.</li>
38+
* <li><code>allowedDoubles</code>: A set of allowed double values.</li>
39+
* <li><code>allowedValues</code>: A set of allowed string values.</li>
40+
* <li><code>enumClass</code>: The class of the enum type, if applicable.</li>
41+
* <li><code>ignoreCase</code>: If true, string matching is case-insensitive.</li>
42+
* </ul>
43+
*
44+
* @author Yusuf Álàmù
45+
* @since 9.0.0
46+
*/
47+
@Documented
48+
@Constraint(validatedBy = { })
1949
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
2050
@Retention(RUNTIME)
21-
@Documented
22-
@Constraint(validatedBy = OneOfValidator.class)
2351
public @interface OneOf {
2452

25-
String[] allowedValues() default { };
53+
String message() default "{org.hibernate.validator.constraints.OneOf.message}";
2654

27-
Class<? extends Enum<?>> enumClass() default DefaultEnum.class;
55+
Class<?>[] groups() default { };
2856

29-
boolean ignoreCase() default false;
57+
Class<? extends Payload>[] payload() default { };
3058

31-
String message() default "must be one of {allowedValues} or is an invalid enum";
59+
int[] allowedIntegers() default { };
3260

33-
Class<?>[] groups() default { };
61+
long[] allowedLongs() default { };
3462

35-
Class<? extends Payload>[] payload() default { };
63+
float[] allowedFloats() default { };
64+
65+
double[] allowedDoubles() default { };
66+
67+
String[] allowedValues() default { };
68+
69+
Class<? extends Enum<?>> enumClass() default DefaultEnum.class;
70+
71+
boolean ignoreCase() default false;
3672

3773
enum DefaultEnum {
3874
}

Diff for: engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/OneOfValidator.java renamed to engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/hv/OneOfValidator.java

+79-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
* SPDX-License-Identifier: Apache-2.0
33
* Copyright Red Hat Inc. and Hibernate Authors
44
*/
5-
package org.hibernate.validator.internal.constraintvalidators.bv;
5+
package org.hibernate.validator.internal.constraintvalidators.hv;
66

77

88
import static java.util.Objects.nonNull;
99

1010
import java.util.ArrayList;
11+
import java.util.Arrays;
1112
import java.util.List;
1213
import java.util.Locale;
1314
import java.util.stream.Stream;
@@ -27,7 +28,7 @@
2728
* @author Yusuf Àlàmù Musa
2829
* @version 1.0
2930
*/
30-
public class OneOfValidator implements ConstraintValidator<OneOf, CharSequence> {
31+
public class OneOfValidator implements ConstraintValidator<OneOf, Object> {
3132

3233
private final List<String> acceptedValues = new ArrayList<>();
3334
private boolean ignoreCase;
@@ -54,6 +55,30 @@ public void initialize(final OneOf constraintAnnotation) {
5455
if ( constraintAnnotation.allowedValues() != null ) {
5556
initializeAcceptedValues( constraintAnnotation.allowedValues() );
5657
}
58+
59+
// If specific allowed values are provided, initialize accepted values from them
60+
if ( constraintAnnotation.allowedIntegers() != null ) {
61+
final String[] acceptedValues = convertIntToStringArray( constraintAnnotation.allowedIntegers() );
62+
initializeAcceptedValues( acceptedValues );
63+
}
64+
65+
// If specific allowed values are provided, initialize accepted values from them
66+
if ( constraintAnnotation.allowedLongs() != null ) {
67+
final String[] acceptedValues = convertLongToStringArray( constraintAnnotation.allowedLongs() );
68+
initializeAcceptedValues( acceptedValues );
69+
}
70+
71+
// If specific allowed values are provided, initialize accepted values from them
72+
if ( constraintAnnotation.allowedFloats() != null ) {
73+
final String[] acceptedValues = convertFloatToStringArray( constraintAnnotation.allowedFloats() );
74+
initializeAcceptedValues( acceptedValues );
75+
}
76+
77+
// If specific allowed values are provided, initialize accepted values from them
78+
if ( constraintAnnotation.allowedDoubles() != null ) {
79+
final String[] acceptedValues = convertDoubleToStringArray( constraintAnnotation.allowedDoubles() );
80+
initializeAcceptedValues( acceptedValues );
81+
}
5782
}
5883

5984
/**
@@ -67,7 +92,7 @@ public void initialize(final OneOf constraintAnnotation) {
6792
* @return {@code true} if the value is valid, {@code false} otherwise.
6893
*/
6994
@Override
70-
public boolean isValid(final CharSequence value, final ConstraintValidatorContext context) {
95+
public boolean isValid(final Object value, final ConstraintValidatorContext context) {
7196
if ( nonNull( value ) ) {
7297
return checkIfValueTheSame( value.toString() );
7398
}
@@ -118,4 +143,55 @@ protected void initializeAcceptedValues(final String... values) {
118143
acceptedValues.addAll( Stream.of( values ).map( String::trim ).toList() );
119144
}
120145
}
146+
147+
/**
148+
* Converts an array of integers to an array of their corresponding string representations.
149+
*
150+
* @param allowedIntegers The array of integers to be converted.
151+
* @return A new array of strings, where each element is the string representation of the corresponding integer from the input array.
152+
*/
153+
private static String[] convertIntToStringArray(final int[] allowedIntegers) {
154+
return Arrays.stream( allowedIntegers )
155+
.mapToObj( String::valueOf ) // Convert each int to String
156+
.toArray( String[]::new );
157+
}
158+
159+
/**
160+
* Converts an array of longs to an array of their corresponding string representations.
161+
*
162+
* @param allowedLongs The array of longs to be converted.
163+
* @return A new array of strings, where each element is the string representation of the corresponding long from the input array.
164+
*/
165+
private static String[] convertLongToStringArray(final long[] allowedLongs) {
166+
return Arrays.stream( allowedLongs )
167+
.mapToObj( String::valueOf ) // Convert each long to String
168+
.toArray( String[]::new );
169+
}
170+
171+
/**
172+
* Converts an array of doubles to an array of their corresponding string representations.
173+
*
174+
* @param allowedDoubles The array of doubles to be converted.
175+
* @return A new array of strings, where each element is the string representation of the corresponding double from the input array.
176+
*/
177+
private static String[] convertDoubleToStringArray(final double[] allowedDoubles) {
178+
return Arrays.stream( allowedDoubles )
179+
.mapToObj( String::valueOf ) // Convert each double to String
180+
.toArray( String[]::new );
181+
}
182+
183+
/**
184+
* Converts an array of floats to an array of their corresponding string representations.
185+
*
186+
* @param allowedFloats The array of floats to be converted.
187+
* @return A new array of strings, where each element is the string representation of the corresponding float from the input array.
188+
*/
189+
private static String[] convertFloatToStringArray(final float[] allowedFloats) {
190+
final String[] acceptedValues = new String[allowedFloats.length];
191+
for ( int i = 0; i < allowedFloats.length; i++ ) {
192+
acceptedValues[i] = String.valueOf( allowedFloats[i] ); // Convert each float to String
193+
}
194+
return acceptedValues;
195+
}
196+
121197
}

Diff for: engine/src/main/java/org/hibernate/validator/internal/metadata/core/BuiltinConstraint.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ enum BuiltinConstraint {
8383
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_TIME_DURATION_MAX( "org.hibernate.validator.constraints.time.DurationMax" ),
8484
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_TIME_DURATION_MIN( "org.hibernate.validator.constraints.time.DurationMin" ),
8585
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_UUID( "org.hibernate.validator.constraints.UUID" ),
86-
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_BITCOIN_ADDRESS( "org.hibernate.validator.constraints.BitcoinAddress" );
86+
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_BITCOIN_ADDRESS( "org.hibernate.validator.constraints.BitcoinAddress" ),
87+
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_ONE_OF( "org.hibernate.validator.constraints.OneOf" );
8788

8889
private static final Map<String, Set<BuiltinConstraint>> CONSTRAINT_MAPPING;
8990

Diff for: engine/src/main/java/org/hibernate/validator/internal/metadata/core/ConstraintHelper.java

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_MOD10_CHECK;
4242
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_MOD11_CHECK;
4343
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_NORMALIZED;
44+
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_ONE_OF;
4445
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PARAMETER_SCRIPT_ASSERT;
4546
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_NIP;
4647
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_PESEL;
@@ -112,6 +113,7 @@
112113
import org.hibernate.validator.constraints.Mod10Check;
113114
import org.hibernate.validator.constraints.Mod11Check;
114115
import org.hibernate.validator.constraints.Normalized;
116+
import org.hibernate.validator.constraints.OneOf;
115117
import org.hibernate.validator.constraints.ParameterScriptAssert;
116118
import org.hibernate.validator.constraints.Range;
117119
import org.hibernate.validator.constraints.ScriptAssert;
@@ -332,6 +334,7 @@
332334
import org.hibernate.validator.internal.constraintvalidators.hv.Mod10CheckValidator;
333335
import org.hibernate.validator.internal.constraintvalidators.hv.Mod11CheckValidator;
334336
import org.hibernate.validator.internal.constraintvalidators.hv.NormalizedValidator;
337+
import org.hibernate.validator.internal.constraintvalidators.hv.OneOfValidator;
335338
import org.hibernate.validator.internal.constraintvalidators.hv.ParameterScriptAssertValidator;
336339
import org.hibernate.validator.internal.constraintvalidators.hv.ScriptAssertValidator;
337340
import org.hibernate.validator.internal.constraintvalidators.hv.URLValidator;
@@ -814,6 +817,9 @@ protected Map<Class<? extends Annotation>, List<? extends ConstraintValidatorDes
814817
if ( enabledBuiltinConstraints.contains( ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_BITCOIN_ADDRESS ) ) {
815818
putBuiltinConstraint( tmpConstraints, BitcoinAddress.class, BitcoinAddressValidator.class );
816819
}
820+
if ( enabledBuiltinConstraints.contains( ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_ONE_OF ) ) {
821+
putBuiltinConstraint( tmpConstraints, OneOf.class, OneOfValidator.class );
822+
}
817823

818824
return tmpConstraints;
819825
}

Diff for: engine/src/main/resources/org/hibernate/validator/ValidationMessages.properties

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ org.hibernate.validator.constraints.LuhnCheck.message = the check
3131
org.hibernate.validator.constraints.Mod10Check.message = the check digit for ${validatedValue} is invalid, Modulo 10 checksum failed
3232
org.hibernate.validator.constraints.Mod11Check.message = the check digit for ${validatedValue} is invalid, Modulo 11 checksum failed
3333
org.hibernate.validator.constraints.Normalized.message = must be normalized
34+
org.hibernate.validator.constraints.OneOf.message = invalid value
3435
org.hibernate.validator.constraints.ParametersScriptAssert.message = script expression "{script}" didn't evaluate to true
3536
org.hibernate.validator.constraints.Range.message = must be between {min} and {max}
3637
org.hibernate.validator.constraints.ScriptAssert.message = script expression "{script}" didn't evaluate to true

Diff for: engine/src/main/resources/org/hibernate/validator/ValidationMessages_ar.properties

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ org.hibernate.validator.constraints.CreditCardNumber.message = \u0631\u06
1919
org.hibernate.validator.constraints.EAN.message = \u0627\u0644\u0634\u0641\u0631\u0629 {type} \u063a\u064a\u0631 \u0635\u0627\u0644\u062d\u0629
2020
org.hibernate.validator.constraints.Length.message = \u0627\u0644\u0637\u0648\u0644 \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0628\u064a\u0646 {min} \u0648{max}
2121
org.hibernate.validator.constraints.CodePointLength.message = \u0627\u0644\u0637\u0648\u0644 \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0628\u064a\u0646 {min} \u0648{max}
22+
org.hibernate.validator.constraints.OneOf.message = \u0642\u064A\u0645\u0629 \u063A\u064A\u0631 \u0635\u062D\u064A\u062D\u0629
2223
org.hibernate.validator.constraints.ParametersScriptAssert.message = \u0627\u0644\u062a\u0639\u0628\u064a\u0631 \u0627\u0644\u0646\u0635\u064a "{script}" \u0644\u0645 \u064a\u062a\u0645 \u062a\u0642\u064a\u064a\u0645\u0647 \u0635\u062d\u064a\u062d\u0627
2324
org.hibernate.validator.constraints.Range.message = \u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0628\u064a\u0646 {min} \u0648{max}
2425
org.hibernate.validator.constraints.ScriptAssert.message = \u0627\u0644\u062a\u0639\u0628\u064a\u0631 \u0627\u0644\u0646\u0635\u064a "{script}" \u0644\u0645 \u064a\u062a\u0645 \u062a\u0642\u064a\u064a\u0645\u0647 \u0635\u062d\u064a\u062d\u0627

Diff for: engine/src/main/resources/org/hibernate/validator/ValidationMessages_az.properties

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ org.hibernate.validator.constraints.LuhnCheck.message = ${validate
3131
org.hibernate.validator.constraints.Mod10Check.message = ${validatedValue} \u00fc\u00e7\u00fcn yoxlama r\u0259q\u0259mi etibars\u0131zd\u0131r, Modulo 10 yoxlamas\u0131 u\u011fursuz oldu
3232
org.hibernate.validator.constraints.Mod11Check.message = ${validatedValue} \u00fc\u00e7\u00fcn yoxlama r\u0259q\u0259mi etibars\u0131zd\u0131r, Modulo 11 yoxlamas\u0131 u\u011fursuz oldu
3333
org.hibernate.validator.constraints.Normalized.message = normalla\u015fd\u0131r\u0131lm\u0131\u015f olmal\u0131d\u0131r
34+
org.hibernate.validator.constraints.OneOf.message = etibars\u0131z d\u0259y\u0259r
3435
org.hibernate.validator.constraints.ParametersScriptAssert.message = skript ifad\u0259si "{script}" 'true' deyil
3536
org.hibernate.validator.constraints.Range.message = {min} v\u0259 {max} aras\u0131nda olmal\u0131d\u0131r
3637
org.hibernate.validator.constraints.ScriptAssert.message = skript ifad\u0259si "{script}" 'true' deyil

Diff for: engine/src/main/resources/org/hibernate/validator/ValidationMessages_cs.properties

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ org.hibernate.validator.constraints.CodePointLength.message = d\u00e9lka
3030
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
3131
org.hibernate.validator.constraints.Mod10Check.message = kontroln\u00ed \u010d\u00edslice pro ${validatedValue} je neplatn\u00e1, kontroln\u00ed sou\u010det Modulo 10 se nezda\u0159il
3232
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
3334
org.hibernate.validator.constraints.ParametersScriptAssert.message = v\u00fdraz skriptu "{script}" se nevyhodnotil na true
3435
org.hibernate.validator.constraints.Range.message = mus\u00ed le\u017eet v rozsahu {min} a\u017e {max}
3536
org.hibernate.validator.constraints.ScriptAssert.message = v\u00fdraz skriptu "{script}" se nevyhodnotil na true

Diff for: engine/src/main/resources/org/hibernate/validator/ValidationMessages_da.properties

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ org.hibernate.validator.constraints.CodePointLength.message = l\u00e6ngde
3030
org.hibernate.validator.constraints.LuhnCheck.message = kontrolcifferet for ${validatedValue} er ugyldigt, Luhn Modulo 10 checksum mislykkedes
3131
org.hibernate.validator.constraints.Mod10Check.message = kontrolcifferet for ${validatedValue} er ugyldigt, Modulo 10 checksum mislykkedes
3232
org.hibernate.validator.constraints.Mod11Check.message = kontrolcifferet for ${validatedValue} er ugyldigt, Modulo 11 checksum mislykkedes
33+
org.hibernate.validator.constraints.OneOf.message = ugyldig v\u00e6rdi
3334
org.hibernate.validator.constraints.ParametersScriptAssert.message = script udtryk "{script}" evaluerede ikke til true
3435
org.hibernate.validator.constraints.Range.message = skal v\u00e6re mellem {min} og {max}
3536
org.hibernate.validator.constraints.ScriptAssert.message = script udtryk "{script}" evaluerede ikke til true

0 commit comments

Comments
 (0)