|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.iloader.node.validators.StringValidator
public class StringValidator
A validator that ensures the given input is a string, and if a regular expression is provided that the given string matches the regular expression.
Field Summary | |
---|---|
static StringValidator |
instance
|
Constructor Summary | |
---|---|
StringValidator()
Creates a new instance of this validator. |
|
StringValidator(java.lang.String regex)
Creates a new instance of this validator with the provided regular expression. |
Method Summary | |
---|---|
boolean |
isBeingValid(java.lang.String value)
Determines if the current value is valid. |
boolean |
isValid(java.lang.String value,
Messages messages)
Determines if the overall input is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final StringValidator instance
Constructor Detail |
---|
public StringValidator()
public StringValidator(java.lang.String regex)
regex
- a regular expressionMethod Detail |
---|
public boolean isBeingValid(java.lang.String value)
IValidator
isBeingValid
in interface IValidator
value
- the string value which has been entered by the end user and requires validation.
public boolean isValid(java.lang.String value, Messages messages)
IValidator
messages
bundle. Any messages added will be displayed to the end user in the form of a messagebox.
isValid
in interface IValidator
value
- the string value which has been entered by the end user and requires validation.messages
- a bundle of messages to be displayed to the end user in the event that validation fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |