1 package org.apache.turbine.services.intake.validator;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 /***
20 * A constraint has a name and a value and an optional message.
21 * The name/value pair will have meaning to a Validator and the
22 * message will serve as an error message in the event the Validator
23 * determines the constraint is violated.
24 * example:
25 * name="maxLength"
26 * value="255"
27 * message="Value cannot be longer than 255 characters."
28 *
29 * @author <a href="mailto:jmcnally@collab.net">John McNally</a>
30 * @version $Id: Constraint.java 264148 2005-08-29 14:21:04Z henning $
31 */
32 public interface Constraint
33 {
34 /***
35 * Get the name of the constraint.
36 */
37 String getName();
38
39 /***
40 * Get the value of the constraint.
41 */
42 String getValue();
43
44 /***
45 * Get the error message.
46 */
47 String getMessage();
48 }