|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- public interface FieldValidator<T>
Responsible for validation of a single field.
Validator
,
FieldValidatorDefaultSource
Method Summary | |
---|---|
boolean |
isRequired()
Returns true if any underlying Validator returns true from Validator.isRequired() . |
void |
render(MarkupWriter writer)
Invokes Validator.render(Field, Object, org.apache.tapestry5.ioc.MessageFormatter, MarkupWriter,
org.apache.tapestry5.services.FormSupport) . |
void |
validate(T value)
Invoked after the client-submitted value has been translated to check that the value conforms
to expectations (often, in terms of minimum or maximum value). |
Method Detail |
---|
void validate(T value) throws ValidationException
translated
to check that the value conforms
to expectations (often, in terms of minimum or maximum value). If and only if the value is approved by all
Validators is the value applied by the field.
value
- the translated value supplied by the user
ValidationException
- if the value violates the constraintvoid render(MarkupWriter writer)
Validator.render(Field, Object, org.apache.tapestry5.ioc.MessageFormatter, MarkupWriter,
org.apache.tapestry5.services.FormSupport)
. This is called at a point "inside" the tag, so that additional
attributes may be added. In many cases, the underlying Validator
may write
client-side JavaScript to enforce the constraint as well.
writer
- markup writer to direct output to.MarkupWriter.attributes(Object[])
boolean isRequired()
Validator
returns true from Validator.isRequired()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |