View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.common.ui.client.validator;
17  
18  public enum ValidationMessageKeys {
19  	REQUIRED("validation.required"),
20  	MIN_OCCURS("validation.minOccurs", "minOccurs"),
21  	MAX_OCCURS("validation.maxOccurs", "maxOccurs"),
22  	REQUIRES_FIELD("validation.requiresField"),
23  	VALID_CHARS("validation.validCharsFailed", "validChars"),
24  	OCCURS("validation.occurs"),
25  	BOOLEAN("validation.mustBeBoolean"),
26  	DOUBLE("validation.mustBeDouble"),
27  	OUT_OF_RANGE("validation.outOfRange"),
28  	MAX_VALUE("validation.maxValueFailed", "maxValue"),
29  	MIN_VALUE("validation.minValueFailed", "minValue"),
30  	FLOAT("validation.mustBeFloat"),
31  	LONG("validation.mustBeLong"),
32  	INTEGER("validation.mustBeInteger"),
33  	DATE("validation.mustBeDate"),
34  	LENGTH_OUT_OF_RANGE("validation.lengthOutOfRange"),
35  	MAX_LENGTH("validation.maxLengthFailed", "maxLength"),
36  	MIN_LENGTH("validation.minLengthFailed", "minLength"),
37  	INVALID_VALUE("validation.invalid");
38      
39  	private final String key;
40  	private final String property;
41  	
42  	private ValidationMessageKeys(final String key) {	
43  		this.key = key;
44  		this.property = "";
45  	}
46  
47  	private ValidationMessageKeys(final String key, final String property) {	
48  		this.key = key;
49  		this.property = property;
50  	}
51  	
52  	public String getKey() {
53  		return this.key;
54  	}
55  	
56  	public String getProperty(){
57  		return this.property;
58  	}
59  }