1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.ui.client.validator; |
17 | |
|
18 | 1 | public enum ValidationMessageKeys { |
19 | 1 | REQUIRED("validation.required"), |
20 | 1 | MIN_OCCURS("validation.minOccurs", "minOccurs"), |
21 | 1 | MAX_OCCURS("validation.maxOccurs", "maxOccurs"), |
22 | 1 | REQUIRES_FIELD("validation.requiresField"), |
23 | 1 | VALID_CHARS("validation.validCharsFailed", "validChars"), |
24 | 1 | OCCURS("validation.occurs"), |
25 | 1 | BOOLEAN("validation.mustBeBoolean"), |
26 | 1 | DOUBLE("validation.mustBeDouble"), |
27 | 1 | OUT_OF_RANGE("validation.outOfRange"), |
28 | 1 | MAX_VALUE("validation.maxValueFailed", "maxValue"), |
29 | 1 | MIN_VALUE("validation.minValueFailed", "minValue"), |
30 | 1 | FLOAT("validation.mustBeFloat"), |
31 | 1 | LONG("validation.mustBeLong"), |
32 | 1 | INTEGER("validation.mustBeInteger"), |
33 | 1 | DATE("validation.mustBeDate"), |
34 | 1 | LENGTH_OUT_OF_RANGE("validation.lengthOutOfRange"), |
35 | 1 | MAX_LENGTH("validation.maxLengthFailed", "maxLength"), |
36 | 1 | MIN_LENGTH("validation.minLengthFailed", "minLength"), |
37 | 1 | INVALID_VALUE("validation.invalid"); |
38 | |
|
39 | |
private final String key; |
40 | |
private final String property; |
41 | |
|
42 | 12 | private ValidationMessageKeys(final String key) { |
43 | 12 | this.key = key; |
44 | 12 | this.property = ""; |
45 | 12 | } |
46 | |
|
47 | 7 | private ValidationMessageKeys(final String key, final String property) { |
48 | 7 | this.key = key; |
49 | 7 | this.property = property; |
50 | 7 | } |
51 | |
|
52 | |
public String getKey() { |
53 | 3 | return this.key; |
54 | |
} |
55 | |
|
56 | |
public String getProperty(){ |
57 | 6 | return this.property; |
58 | |
} |
59 | |
} |