Package com.iplanet.ums.validation
Interface IValidator
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AlphaValidator,BooleanValidator,DNValidator,DomainValidator,FloatValidator,MailAddressValidator,NumberValidator,SetValidator,TelephoneValidator,URLValidator
public interface IValidator extends Serializable
Interface for all validators. This is handle for doing validations and should be implemented by all validating classes. Implementation is specific to that implementing classs with a set of validating rules
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanvalidate(String value, String rule)Validates value with the optional rule.
-
-
-
Field Detail
-
PKG
static final String PKG
Resource keys package name- See Also:
- Constant Field Values
-
PREFIX
static final String PREFIX
package prefix- See Also:
- Constant Field Values
-
BAD_VALUE
static final String BAD_VALUE
constant string value to represent badvalue- See Also:
- Constant Field Values
-
BAD_RULE
static final String BAD_RULE
constant string value to represent badrule- See Also:
- Constant Field Values
-
-
Method Detail
-
validate
boolean validate(String value, String rule)
Validates value with the optional rule.Example: SetValidator.validate("A", "A,B,C,D,F"); RangeValidator.validate("10", "1-24"); MailAddressValidator.validate("bogus@sun.com", null);- Parameters:
value- attribute value to testrule- optional rule applies to each validator- Returns:
- true if validates successfully
-
-