File tree 3 files changed +11
-12
lines changed
main/java/ru/mystamps/web/feature/participant
test/java/ru/mystamps/web/tests
3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 25
25
import javax .validation .constraints .NotNull ;
26
26
import javax .validation .constraints .Size ;
27
27
28
- import static ru .mystamps .web .feature .participant .ParticipantValidation .PARTICIPANT_NAME_MAX_LENGTH ;
29
- import static ru .mystamps .web .feature .participant .ParticipantValidation .PARTICIPANT_NAME_MIN_LENGTH ;
30
- import static ru .mystamps .web .feature .participant .ParticipantValidation .PARTICIPANT_URL_MAX_LENGTH ;
28
+ import static ru .mystamps .web .feature .participant .ParticipantValidation .NAME_MAX_LENGTH ;
29
+ import static ru .mystamps .web .feature .participant .ParticipantValidation .NAME_MIN_LENGTH ;
30
+ import static ru .mystamps .web .feature .participant .ParticipantValidation .URL_MAX_LENGTH ;
31
31
32
32
@ Getter
33
33
@ Setter
34
34
public class AddParticipantForm implements AddParticipantDto {
35
35
36
36
@ NotEmpty
37
37
@ Size .List ({
38
- @ Size (min = PARTICIPANT_NAME_MIN_LENGTH , message = "{value.too-short}" ),
39
- @ Size (max = PARTICIPANT_NAME_MAX_LENGTH , message = "{value.too-long}" )
38
+ @ Size (min = NAME_MIN_LENGTH , message = "{value.too-short}" ),
39
+ @ Size (max = NAME_MAX_LENGTH , message = "{value.too-long}" )
40
40
})
41
41
private String name ;
42
42
43
43
@ URL
44
- @ Size (max = PARTICIPANT_URL_MAX_LENGTH , message = "{value.too-long}" )
44
+ @ Size (max = URL_MAX_LENGTH , message = "{value.too-long}" )
45
45
private String url ;
46
46
47
47
// FIXME: must be positive
Original file line number Diff line number Diff line change 19
19
20
20
import ru .mystamps .web .feature .participant .ParticipantDb .TransactionParticipant ;
21
21
22
- // @todo #927 ParticipantValidation: remove PARTICIPANT_ prefix from the constants
23
22
@ SuppressWarnings ("PMD.CommentDefaultAccessModifier" )
24
23
public final class ParticipantValidation {
25
24
26
- public static final int PARTICIPANT_NAME_MIN_LENGTH = 3 ;
27
- public static final int PARTICIPANT_NAME_MAX_LENGTH = TransactionParticipant .NAME_LENGTH ;
28
- static final int PARTICIPANT_URL_MAX_LENGTH = TransactionParticipant .URL_LENGTH ;
25
+ public static final int NAME_MIN_LENGTH = 3 ;
26
+ public static final int NAME_MAX_LENGTH = TransactionParticipant .NAME_LENGTH ;
27
+ static final int URL_MAX_LENGTH = TransactionParticipant .URL_LENGTH ;
29
28
30
29
private ParticipantValidation () {
31
30
}
Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ public static String countrySlug() {
176
176
177
177
public static String participantName () {
178
178
return between (
179
- ParticipantValidation .PARTICIPANT_NAME_MIN_LENGTH ,
180
- ParticipantValidation .PARTICIPANT_NAME_MAX_LENGTH
179
+ ParticipantValidation .NAME_MIN_LENGTH ,
180
+ ParticipantValidation .NAME_MAX_LENGTH
181
181
).english ();
182
182
}
183
183
You can’t perform that action at this time.
0 commit comments