Package com.iplanet.ums.validation
Class TelephoneValidator
- java.lang.Object
-
- com.iplanet.ums.validation.TelephoneValidator
-
- All Implemented Interfaces:
IValidator,Serializable
public class TelephoneValidator extends Object implements IValidator
Validates telephone number The object of this class is constructed using default constructor and validate function is used to validate telephone number passing the telephone number as argument to the function. Upon validation the validate function returns boolean value.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.iplanet.ums.validation.IValidator
BAD_RULE, BAD_VALUE, PKG, PREFIX
-
-
Constructor Summary
Constructors Constructor Description TelephoneValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanvalidate(String telephone)Determines whether the specified string is a valid "basic" telephone number stringbooleanvalidate(String value, String rule)Determines if the value is a valid "basic" telephone number string
-
-
-
Method Detail
-
validate
public boolean validate(String value, String rule)
Determines if the value is a valid "basic" telephone number string- Specified by:
validatein interfaceIValidator- Parameters:
value- string value to validaterule- not used by this method- Returns:
- true if the value represents a valid telephone number string
-
validate
public boolean validate(String telephone)
Determines whether the specified string is a valid "basic" telephone number string- Parameters:
telephone- string telephone to validate- Returns:
- true if telephone is a valid telephone number string
-
-