Class ValidationPattern
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.ValidationPattern
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CharacterLevelValidationPattern,FieldLevelValidationPattern
Deprecated.
Abstraction of the regular expressions used to validate attribute values.
The validationPattern element defines the allowable character-level
or field-level values for an attribute.
JSTL: validationPattern is a Map which is accessed using a key
of "validationPattern". Each entry may contain some of the keys
listed below. The keys that may be present for a given attribute
are dependent upon the type of validationPattern.
maxLength (String)
exactLength
type
allowWhitespace
allowUnderscore
allowPeriod
validChars
precision
scale
allowNegative
The allowable keys (in addition to type) for each type are:
***Type**** ***Keys***
alphanumeric exactLength
maxLength
allowWhitespace
allowUnderscore
allowPeriod
alpha exactLength
maxLength
allowWhitespace
anyCharacter exactLength
maxLength
allowWhitespace
charset validChars
numeric exactLength
maxLength
fixedPoint allowNegative
precision
scale
floatingPoint allowNegative
date n/a
emailAddress n/a
javaClass n/a
month n/a
phoneNumber n/a
timestamp n/a
year n/a
zipcode n/a
Note: maxLength and exactLength are mutually exclusive.
If one is entered, the other may not be entered.
Note: See ApplicationResources.properties for
exact regex patterns.
e.g. validationPatternRegex.date for regex used in date validation.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.exception thrown when a ValidationPattern is in an incorrect state. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ExportMapbuildExportMap(String exportKey) Deprecated.Builds an export map describing the subclass instance.voidDeprecated.This method throws an exception if it is not configured properlyabstract PatternDeprecated.protected abstract StringDeprecated.abstract StringDeprecated.String[]getValidationErrorMessageParameters(String attributeLabel) Deprecated.booleanDeprecated.Determines if an input string matches the pattern.
-
Constructor Details
-
ValidationPattern
public ValidationPattern()Deprecated.
-
-
Method Details
-
getRegexPattern
Deprecated.- Returns:
- regular expression Pattern generated by the individual ValidationPattern subclass
-
getRegexString
Deprecated.- Returns:
- String version of regular expression base, suitable for modification with length-specifiers and used internally by getRegexPattern
-
matches
Deprecated.Determines if an input string matches the pattern.- Parameters:
input- input string- Returns:
- true if the given String matches this pattern
-
buildExportMap
Deprecated.Builds an export map describing the subclass instance.- Parameters:
exportKey-- Returns:
- export map
-
getValidationErrorMessageKey
Deprecated. -
getValidationErrorMessageParameters
Deprecated. -
completeValidation
Deprecated.This method throws an exception if it is not configured properly
-