Package org.apache.wicket.validation
Interface IValidatable<T>
-
- Type Parameters:
T- type of value
- All Known Implementing Classes:
Validatable
public interface IValidatable<T>Interface representing any object that can be validated.- Since:
- 1.2.6
- Author:
- Igor Vaynberg (ivaynberg)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiderror(IValidationError error)Reports an error against thisIValidatable's value.IModel<T>getModel()Returns the model of the component being validatedTgetValue()Retrieves the value to be validated.booleanisValid()Queries the current state of thisIValidatableinstance.
-
-
-
Method Detail
-
getValue
T getValue()
Retrieves the value to be validated.- Returns:
- the value to be validated
-
error
void error(IValidationError error)
Reports an error against thisIValidatable's value. Multiple errors can be reported by calling this method multiple times.- Parameters:
error- anIValidationErrorto be reported
-
isValid
boolean isValid()
Queries the current state of thisIValidatableinstance.IValidatables should assume they are valid untilerror(IValidationError)is called.- Returns:
trueif the object is in a valid state,falseif otherwise
-
-