1 15 package org.apache.tapestry.valid; 16 17 import java.io.Serializable ; 18 19 24 25 public class ValidationConstraint implements Serializable 26 { 27 private static final long serialVersionUID = 371593028205311930L; 28 29 33 34 public static final ValidationConstraint REQUIRED = new ValidationConstraint("REQUIRED"); 35 36 40 41 public static final ValidationConstraint MINIMUM_WIDTH = new ValidationConstraint( 42 "MINIMUM_WIDTH"); 43 44 48 49 public static final ValidationConstraint MAXIMUM_WIDTH = new ValidationConstraint( 50 "MAXIMUM_WIDTH"); 51 52 55 56 public static final ValidationConstraint DATE_FORMAT = new ValidationConstraint("DATE_FORMAT"); 57 58 61 62 public static final ValidationConstraint EMAIL_FORMAT = new ValidationConstraint("EMAIL_FORMAT"); 63 64 67 68 public static final ValidationConstraint NUMBER_FORMAT = new ValidationConstraint( 69 "NUMBER_FORMAT"); 70 71 74 75 public static final ValidationConstraint TOO_SMALL = new ValidationConstraint("TOO_SMALL"); 76 77 80 81 public static final ValidationConstraint TOO_LARGE = new ValidationConstraint("TOO_LARGE"); 82 83 88 89 public static final ValidationConstraint PATTERN_MISMATCH = new ValidationConstraint( 90 "PATTERN_MISMATCH"); 91 92 97 98 public static final ValidationConstraint CONSISTENCY = new ValidationConstraint("CONSISTENCY"); 99 100 105 106 public static final ValidationConstraint URL_FORMAT = new ValidationConstraint("URL_FORMAT"); 107 108 113 114 public static final ValidationConstraint DISALLOWED_PROTOCOL = new ValidationConstraint( 115 "DISALLOWED_PROTOCOL"); 116 117 private final String _name; 118 119 122 123 protected ValidationConstraint(String name) 124 { 125 _name = name; 126 } 127 128 public String toString() 129 { 130 return "ValidationConstraint[" + _name + "]"; 131 } 132 } | Popular Tags |