Skip to content

Commit d8c8faa

Browse files
Boiarshinovgsmet
authored andcommitted
HV-1822 add russian specific INN annotation
1 parent 3304647 commit d8c8faa

28 files changed

+525
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ public ConstraintHelper(Types typeUtils, AnnotationApiHelper annotationApiHelper
302302
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.REGON_CHECK, CharSequence.class );
303303
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NIP_CHECK, CharSequence.class );
304304
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.PESEL_CHECK, CharSequence.class );
305+
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.INN_CHECK, CharSequence.class );
305306
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NOT_BLANK, CharSequence.class );
306307
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NOT_EMPTY, TYPES_SUPPORTED_BY_SIZE_AND_NOT_EMPTY_ANNOTATIONS );
307308
registerAllowedTypesForBuiltInConstraint( HibernateValidatorTypes.NORMALIZED, CharSequence.class );

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public static class HibernateValidatorTypes {
7878
public static final String REGON_CHECK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".pl.REGON";
7979
public static final String NIP_CHECK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".pl.NIP";
8080
public static final String PESEL_CHECK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".pl.PESEL";
81+
public static final String INN_CHECK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".ru.INN";
8182
public static final String NORMALIZED = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".Normalized";
8283
public static final String NOT_BLANK = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".NotBlank";
8384
public static final String NOT_EMPTY = ORG_HIBERNATE_VALIDATOR_CONSTRAINTS + ".NotEmpty";

documentation/src/main/asciidoc/ch02.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,11 @@ Hibernate Validator!
768768
Hibernate metadata impact::: None
769769
Country::: Poland
770770

771+
`@INN`:: Checks that the annotated character sequence represents a Russian taxpayer identification number (https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80_%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%BF%D0%BB%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D1%89%D0%B8%D0%BA%D0%B0[INN]). Can be applied to both individual and juridical versions of INN
772+
Supported data types::: `CharSequence`
773+
Hibernate metadata impact::: None
774+
Country::: Russia
775+
771776
[TIP]
772777
====
773778
In some cases neither the Jakarta Bean Validation constraints nor the custom constraints provided by
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Hibernate Validator, declare and validate application constraints
3+
*
4+
* License: Apache License, Version 2.0
5+
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6+
*/
7+
package org.hibernate.validator.cfg.defs.ru;
8+
9+
import org.hibernate.validator.cfg.ConstraintDef;
10+
import org.hibernate.validator.constraints.ru.INN;
11+
12+
/**
13+
* @author Artem Boiarshinov
14+
*/
15+
public class INNDef extends ConstraintDef<INNDef, INN> {
16+
17+
public INNDef() {
18+
super( INN.class );
19+
}
20+
21+
public INNDef type(INN.Type type) {
22+
addParameter( "type", type );
23+
return this;
24+
}
25+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Hibernate Validator, declare and validate application constraints
3+
*
4+
* License: Apache License, Version 2.0
5+
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6+
*/
7+
8+
/**
9+
* <p>Russian specific constraint definition classes for programmatic constraint definition API.</p>
10+
* <p>This package is part of the public Hibernate Validator API.</p>
11+
*/
12+
13+
package org.hibernate.validator.cfg.defs.ru;
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/*
2+
* Hibernate Validator, declare and validate application constraints
3+
*
4+
* License: Apache License, Version 2.0
5+
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6+
*/
7+
package org.hibernate.validator.constraints.ru;
8+
9+
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
10+
import static java.lang.annotation.ElementType.CONSTRUCTOR;
11+
import static java.lang.annotation.ElementType.FIELD;
12+
import static java.lang.annotation.ElementType.METHOD;
13+
import static java.lang.annotation.ElementType.PARAMETER;
14+
import static java.lang.annotation.ElementType.TYPE_USE;
15+
import static java.lang.annotation.RetentionPolicy.RUNTIME;
16+
17+
import java.lang.annotation.Documented;
18+
import java.lang.annotation.Repeatable;
19+
import java.lang.annotation.Retention;
20+
import java.lang.annotation.Target;
21+
22+
import javax.validation.Constraint;
23+
import javax.validation.Payload;
24+
import javax.validation.ReportAsSingleViolation;
25+
26+
import org.hibernate.validator.constraints.ru.INN.List;
27+
28+
/**
29+
* Checks that the annotated character sequence is a valid russian taxpayer
30+
* identification number (INN in russian transliteration).
31+
*
32+
* @author Artem Boiarshinov
33+
* @see <a href="https://www.nalog.ru/rn77/fl/interest/inn/">russian taxpayer identification number</a>
34+
*/
35+
@Documented
36+
@Constraint(validatedBy = {})
37+
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
38+
@Retention(RUNTIME)
39+
@Repeatable(List.class)
40+
@ReportAsSingleViolation
41+
public @interface INN {
42+
43+
String message() default "{org.hibernate.validator.constraints.ru.INN.message}";
44+
45+
Class<?>[] groups() default {};
46+
47+
Class<? extends Payload>[] payload() default {};
48+
49+
Type type() default Type.ANY;
50+
51+
/**
52+
* Defines several {@code @INN} annotations on the same element.
53+
*/
54+
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
55+
@Retention(RUNTIME)
56+
@Documented
57+
public @interface List {
58+
59+
INN[] value();
60+
}
61+
62+
/**
63+
* Defines the INN length. Valid lengths of INN are {@code 12} for individual usage
64+
* and {@code 10} for juridical which are represented as {@link INN.Type#INDIVIDUAL}
65+
* and {@link INN.Type#JURIDICAL} respectively.
66+
* <p>
67+
* Using {@link INN.Type#ANY} allows to validate values that could either be personal
68+
* or juridical.
69+
* In such case, INN type would be determined by the length of the corresponding value.
70+
*/
71+
enum Type {
72+
INDIVIDUAL,
73+
JURIDICAL,
74+
ANY
75+
}
76+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Hibernate Validator, declare and validate application constraints
3+
*
4+
* License: Apache License, Version 2.0
5+
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6+
*/
7+
8+
/**
9+
* <p>Hibernate Validator Russian constraints.</p>
10+
* <p>This package is part of the public Hibernate Validator API.</p>
11+
*/
12+
package org.hibernate.validator.constraints.ru;
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
/*
2+
* Hibernate Validator, declare and validate application constraints
3+
*
4+
* License: Apache License, Version 2.0
5+
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6+
*/
7+
package org.hibernate.validator.internal.constraintvalidators.hv.ru;
8+
9+
import java.util.regex.Pattern;
10+
11+
import org.hibernate.validator.constraints.ru.INN;
12+
import org.hibernate.validator.internal.util.Contracts;
13+
14+
import javax.validation.ConstraintValidator;
15+
import javax.validation.ConstraintValidatorContext;
16+
17+
/**
18+
* Checks that a given character sequence (e.g. string) is a valid INN.
19+
*
20+
* @author Artem Boiarshinov
21+
*/
22+
public class INNValidator implements ConstraintValidator<INN, CharSequence> {
23+
24+
private static final Pattern NUMBERS_ONLY_PATTERN = Pattern.compile( "[0-9]+" );
25+
private static final int RADIX = 10;
26+
27+
private INNValidationAlgorithm innValidationAlgorithm;
28+
29+
@Override
30+
public void initialize(INN constraintAnnotation) {
31+
this.innValidationAlgorithm = INNValidationAlgorithm.from( constraintAnnotation.type() );
32+
}
33+
34+
@Override
35+
public boolean isValid(CharSequence innCharSeq, ConstraintValidatorContext context) {
36+
if ( innCharSeq == null ) {
37+
return true;
38+
}
39+
40+
final String inn = innCharSeq.toString();
41+
42+
final boolean hasOnlyNumbers = NUMBERS_ONLY_PATTERN.matcher( inn ).matches();
43+
if ( !hasOnlyNumbers ) {
44+
return false;
45+
}
46+
47+
if ( !innValidationAlgorithm.isValidLength( inn.length() ) ) {
48+
return false;
49+
}
50+
51+
final int[] digits = inn.codePoints().map( symbol -> Character.digit( symbol, RADIX ) ).toArray();
52+
53+
return innValidationAlgorithm.isValidChecksum( digits );
54+
55+
}
56+
57+
private interface INNValidationAlgorithm {
58+
boolean isValidLength(int length);
59+
60+
boolean isValidChecksum(int[] digits);
61+
62+
static INNValidationAlgorithm from(org.hibernate.validator.constraints.ru.INN.Type type) {
63+
Contracts.assertNotNull( type );
64+
switch ( type ) {
65+
case JURIDICAL:
66+
return INNValidationAlgorithmImpl.JURIDICAL;
67+
case INDIVIDUAL:
68+
return INNValidationAlgorithmImpl.INDIVIDUAL;
69+
case ANY:
70+
default:
71+
return INNValidationAlgorithmImpl.ANY;
72+
}
73+
}
74+
}
75+
76+
private enum INNValidationAlgorithmImpl implements INNValidationAlgorithm {
77+
78+
INDIVIDUAL {
79+
@Override
80+
public boolean isValidLength(int length) {
81+
return 12 == length;
82+
}
83+
84+
@Override
85+
public boolean isValidChecksum(int[] digits) {
86+
return checkChecksumPersonalINN( digits );
87+
}
88+
},
89+
JURIDICAL {
90+
@Override
91+
public boolean isValidLength(int length) {
92+
return 10 == length;
93+
}
94+
95+
@Override
96+
public boolean isValidChecksum(int[] digits) {
97+
return checkChecksumJuridicalINN( digits );
98+
}
99+
},
100+
ANY {
101+
@Override
102+
public boolean isValidLength(int length) {
103+
return 10 == length || 12 == length;
104+
}
105+
106+
@Override
107+
public boolean isValidChecksum(int[] digits) {
108+
final int length = digits.length;
109+
if ( length == 12 ) {
110+
return checkChecksumPersonalINN( digits );
111+
}
112+
else if ( length == 10 ) {
113+
return checkChecksumJuridicalINN( digits );
114+
}
115+
throw new IllegalStateException( "Invalid/unsupported inn value length" );
116+
}
117+
};
118+
119+
private static final int[] INDIVIDUAL_WEIGHTS_11 = { 7, 2, 4, 10, 3, 5, 9, 4, 6, 8 };
120+
private static final int[] INDIVIDUAL_WEIGHTS_12 = { 3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8 };
121+
private static final int[] JURIDICAL_WEIGHTS = { 2, 4, 10, 3, 5, 9, 4, 6, 8 };
122+
123+
private static final int MOD_11 = 11;
124+
private static final int MOD_10 = 10;
125+
126+
/**
127+
* Check the digits for personal INN using algorithm from
128+
* <a href="https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80_%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%BF%D0%BB%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D1%89%D0%B8%D0%BA%D0%B0#%D0%92%D1%8B%D1%87%D0%B8%D1%81%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B%D1%85_%D1%86%D0%B8%D1%84%D1%80">Wikipedia</a>.
129+
*/
130+
private static boolean checkChecksumPersonalINN(int[] digits) {
131+
final int checkSum11 = getCheckSum( digits, INDIVIDUAL_WEIGHTS_11 );
132+
final int checkSum12 = getCheckSum( digits, INDIVIDUAL_WEIGHTS_12 );
133+
134+
final boolean isCheckSum11Correct = checkSum11 == digits[digits.length - 2];
135+
final boolean isCheckSum12Correct = checkSum12 == digits[digits.length - 1];
136+
137+
return isCheckSum11Correct && isCheckSum12Correct;
138+
}
139+
140+
/**
141+
* Check the digits for juridical INN using algorithm from
142+
* <a href="https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80_%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%BF%D0%BB%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D1%89%D0%B8%D0%BA%D0%B0#%D0%92%D1%8B%D1%87%D0%B8%D1%81%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B%D1%85_%D1%86%D0%B8%D1%84%D1%80">Wikipedia</a>.
143+
*/
144+
private static boolean checkChecksumJuridicalINN(int[] digits) {
145+
final int checkSum = getCheckSum( digits, JURIDICAL_WEIGHTS );
146+
return digits[digits.length - 1] == checkSum;
147+
}
148+
149+
private static int getCheckSum(int[] digits, int[] weights) {
150+
int sum = 0;
151+
for ( int i = 0; i < weights.length; i++ ) {
152+
sum += digits[i] * weights[i];
153+
}
154+
return ( sum % MOD_11 ) % MOD_10;
155+
}
156+
}
157+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ enum BuiltinConstraint {
8686
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_NIP("org.hibernate.validator.constraints.pl.NIP"),
8787
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_PESEL("org.hibernate.validator.constraints.pl.PESEL"),
8888
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_REGON("org.hibernate.validator.constraints.pl.REGON"),
89+
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_RU_INN("org.hibernate.validator.constraints.ru.INN"),
8990
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_TIME_DURATION_MAX("org.hibernate.validator.constraints.time.DurationMax"),
9091
ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_TIME_DURATION_MIN("org.hibernate.validator.constraints.time.DurationMin");
9192

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_PESEL;
5151
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_REGON;
5252
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_RANGE;
53+
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_RU_INN;
5354
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_SCRIPT_ASSERT;
5455
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_TIME_DURATION_MAX;
5556
import static org.hibernate.validator.internal.metadata.core.BuiltinConstraint.ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_TIME_DURATION_MIN;
@@ -126,6 +127,7 @@
126127
import org.hibernate.validator.constraints.pl.NIP;
127128
import org.hibernate.validator.constraints.pl.PESEL;
128129
import org.hibernate.validator.constraints.pl.REGON;
130+
import org.hibernate.validator.constraints.ru.INN;
129131
import org.hibernate.validator.constraints.time.DurationMax;
130132
import org.hibernate.validator.constraints.time.DurationMin;
131133
import org.hibernate.validator.internal.constraintvalidators.bv.AssertFalseValidator;
@@ -341,6 +343,7 @@
341343
import org.hibernate.validator.internal.constraintvalidators.hv.pl.NIPValidator;
342344
import org.hibernate.validator.internal.constraintvalidators.hv.pl.PESELValidator;
343345
import org.hibernate.validator.internal.constraintvalidators.hv.pl.REGONValidator;
346+
import org.hibernate.validator.internal.constraintvalidators.hv.ru.INNValidator;
344347
import org.hibernate.validator.internal.constraintvalidators.hv.time.DurationMaxValidator;
345348
import org.hibernate.validator.internal.constraintvalidators.hv.time.DurationMinValidator;
346349
import org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorDescriptor;
@@ -797,6 +800,9 @@ private ConstraintHelper(Set<BuiltinConstraint> enabledBuiltinConstraints) {
797800
if ( enabledBuiltinConstraints.contains( ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_PL_REGON ) ) {
798801
putBuiltinConstraint( tmpConstraints, REGON.class, REGONValidator.class );
799802
}
803+
if ( enabledBuiltinConstraints.contains( ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_RU_INN ) ) {
804+
putBuiltinConstraint( tmpConstraints, INN.class, INNValidator.class );
805+
}
800806
if ( enabledBuiltinConstraints.contains( ORG_HIBERNATE_VALIDATOR_CONSTRAINTS_SCRIPT_ASSERT ) ) {
801807
putBuiltinConstraint( tmpConstraints, ScriptAssert.class, ScriptAssertValidator.class );
802808
}

engine/src/main/resources/org/hibernate/validator/ValidationMessages.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,7 @@ org.hibernate.validator.constraints.pl.REGON.message = invalid Po
4949
org.hibernate.validator.constraints.pl.NIP.message = invalid VAT Identification Number (NIP)
5050
org.hibernate.validator.constraints.pl.PESEL.message = invalid Polish National Identification Number (PESEL)
5151

52+
org.hibernate.validator.constraints.ru.INN.message = invalid Russian taxpayer identification number (INN)
53+
5254
org.hibernate.validator.constraints.time.DurationMax.message = must be shorter than${inclusive == true ? ' or equal to' : ''}${days == 0 ? '' : days == 1 ? ' 1 day' : ' ' += days += ' days'}${hours == 0 ? '' : hours == 1 ? ' 1 hour' : ' ' += hours += ' hours'}${minutes == 0 ? '' : minutes == 1 ? ' 1 minute' : ' ' += minutes += ' minutes'}${seconds == 0 ? '' : seconds == 1 ? ' 1 second' : ' ' += seconds += ' seconds'}${millis == 0 ? '' : millis == 1 ? ' 1 milli' : ' ' += millis += ' millis'}${nanos == 0 ? '' : nanos == 1 ? ' 1 nano' : ' ' += nanos += ' nanos'}
5355
org.hibernate.validator.constraints.time.DurationMin.message = must be longer than${inclusive == true ? ' or equal to' : ''}${days == 0 ? '' : days == 1 ? ' 1 day' : ' ' += days += ' days'}${hours == 0 ? '' : hours == 1 ? ' 1 hour' : ' ' += hours += ' hours'}${minutes == 0 ? '' : minutes == 1 ? ' 1 minute' : ' ' += minutes += ' minutes'}${seconds == 0 ? '' : seconds == 1 ? ' 1 second' : ' ' += seconds += ' seconds'}${millis == 0 ? '' : millis == 1 ? ' 1 milli' : ' ' += millis += ' millis'}${nanos == 0 ? '' : nanos == 1 ? ' 1 nano' : ' ' += nanos += ' nanos'}

engine/src/main/resources/org/hibernate/validator/ValidationMessages_cs.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ org.hibernate.validator.constraints.pl.REGON.message = neplatn\u0
4848
org.hibernate.validator.constraints.pl.NIP.message = neplatn\u00e9 da\u0148ov\u00e9 identifika\u010dn\u00ed \u010d\u00edslo (NIP)
4949
org.hibernate.validator.constraints.pl.PESEL.message = neplatn\u00e9 Polsk\u00e9 n\u00e1rodn\u00ed Identifika\u010dn\u00ed \u010d\u00edslo (PESEL)
5050

51+
org.hibernate.validator.constraints.ru.INN.message = neplatn\u00e9 ru\u0161tina Identifika\u010dn\u00ed \u010d\u00edslo pl\u00e1tn\u011b dan\u011b (INN)
52+
5153
org.hibernate.validator.constraints.time.DurationMax.message = mus\u00ed b\u00fdt krat\u0161\u00ed ne\u017e${inclusive == true ? ' nebo rovno hodnot\u011b' : ''}${days == 0 ? '' : days == 1 ? ' 1 den' : ' ' += days += ' dny/\u016f'}${hours == 0 ? '' : hours == 1 ? ' 1 hod' : ' ' += hours += ' hod'}${minutes == 0 ? '' : minutes == 1 ? ' 1 min' : ' ' += minutes += ' min'}${seconds == 0 ? '' : seconds == 1 ? ' 1 s' : ' ' += seconds += ' s'}${millis == 0 ? '' : millis == 1 ? ' 1 ms' : ' ' += millis += ' ms'}${nanos == 0 ? '' : nanos == 1 ? ' 1 ns' : ' ' += nanos += ' ns'}
5254
org.hibernate.validator.constraints.time.DurationMin.message = mus\u00ed b\u00fdt del\u0161\u00ed ne\u017e${inclusive == true ? ' nebo rovno hodnot\u011b' : ''}${days == 0 ? '' : days == 1 ? ' 1 den' : ' ' += days += ' dny/\u016f'}${hours == 0 ? '' : hours == 1 ? ' 1 hod' : ' ' += hours += ' hod'}${minutes == 0 ? '' : minutes == 1 ? ' 1 min' : ' ' += minutes += ' min'}${seconds == 0 ? '' : seconds == 1 ? ' 1 s' : ' ' += seconds += ' s'}${millis == 0 ? '' : millis == 1 ? ' 1 ms' : ' ' += millis += ' ms'}${nanos == 0 ? '' : nanos == 1 ? ' 1 ns' : ' ' += nanos += ' ns'}

engine/src/main/resources/org/hibernate/validator/ValidationMessages_da.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ org.hibernate.validator.constraints.pl.REGON.message = ugyldigt po
4848
org.hibernate.validator.constraints.pl.NIP.message = ugyldigt momsidentifikationsnummer (NIP)
4949
org.hibernate.validator.constraints.pl.PESEL.message = ugyldigt polsk nationalt identifikationsnummer (PESEL)
5050

51+
org.hibernate.validator.constraints.ru.INN.message = ugyldigt russisk skattebetalers identifikationsnummer (INN)
52+
5153
org.hibernate.validator.constraints.time.DurationMax.message = skal v\u00e6re kortere end${inclusive == true ? ' eller lig med' : ''}${days == 0 ? '' : days == 1 ? ' 1 dag' : ' ' += days += ' dage'}${hours == 0 ? '' : hours == 1 ? ' 1 time' : ' ' += hours += ' timer'}${minutes == 0 ? '' : minutes == 1 ? ' 1 minut' : ' ' += minutes += ' minutter'}${seconds == 0 ? '' : seconds == 1 ? ' 1 sekund' : ' ' += seconds += ' sekunder'}${millis == 0 ? '' : millis == 1 ? ' 1 millisekund' : ' ' += millis += ' millisekunder'}${nanos == 0 ? '' : nanos == 1 ? ' 1 nanosekund' : ' ' += nanos += ' nanosekunder'}
5254
org.hibernate.validator.constraints.time.DurationMin.message = skal v\u00e6re l\u00e6ngere end${inclusive == true ? ' eller lig med' : ''}${days == 0 ? '' : days == 1 ? ' 1 dag' : ' ' += days += ' dage'}${hours == 0 ? '' : hours == 1 ? ' 1 time' : ' ' += hours += ' timer'}${minutes == 0 ? '' : minutes == 1 ? ' 1 minut' : ' ' += minutes += ' minutter'}${seconds == 0 ? '' : seconds == 1 ? ' 1 sekund' : ' ' += seconds += ' sekunder'}${millis == 0 ? '' : millis == 1 ? ' 1 millisekund' : ' ' += millis += ' millisekunder'}${nanos == 0 ? '' : nanos == 1 ? ' 1 nanosekund' : ' ' += nanos += ' nanosekunder'}

0 commit comments

Comments
 (0)