|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValidationInterface
ValidationInterface is used to allow an object to validate input, normalize input and return error information when the information is invalid.
The ValidationInterface was designed to be used by input components such as the TextField. Components which used validators should implement the ValidatorInterface so that there is a standard way to set/get the validator.
com.sas.util.validators.Validator is a default implementation of the ValidationInterface.
Method Summary | |
---|---|
com.sas.text.Message |
getValidationMessage()
Returns the validation message set when validateValue() last returned false. |
java.lang.String |
getValidationMessageCode()
Returns the validation message code set when validateValue() last returned false. |
java.lang.Object |
normalizeValue(java.lang.Object component,
java.lang.Object value)
Allows the validator to modify the value after it has been deemed valid. |
void |
setValidationMessage(com.sas.text.Message message)
Sets the validation message which indicates why validateValue() returned false. |
boolean |
validateValue(java.lang.Object component,
java.lang.Object value)
Validates the value passed in (possibly) based on information from the component passed in. |
Method Detail |
---|
boolean validateValue(java.lang.Object component, java.lang.Object value)
component
- an object containing the valuevalue
- the value to be validated
java.lang.Object normalizeValue(java.lang.Object component, java.lang.Object value)
This might be used to change a valid date such as "5/5/96" into a normalized form such as "May 5, 1996".
component
- an object containing the valuevalue
- the value to be normalized
java.lang.String getValidationMessageCode()
com.sas.text.Message getValidationMessage()
void setValidationMessage(com.sas.text.Message message)
message
- a Message object that contains a format string and substitution values,
which describe why the value passed to validateValue() is invalid.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |