Search in sources :

Example 1 with PrimitiveFieldConstraintGenerator

use of org.apache.tapestry5.internal.beaneditor.PrimitiveFieldConstraintGenerator in project tapestry-5 by apache.

the class TapestryModule method contributeValidationConstraintGenerator.

/**
 * Adds built-in constraint generators:
 * <ul>
 * <li>PrimtiveField -- primitive fields are always required
 * <li>ValidateAnnotation -- adds constraints from a {@link Validate} annotation
 * </ul>
 */
public static void contributeValidationConstraintGenerator(OrderedConfiguration<ValidationConstraintGenerator> configuration) {
    configuration.add("PrimitiveField", new PrimitiveFieldConstraintGenerator());
    configuration.add("ValidateAnnotation", new ValidateAnnotationConstraintGenerator());
    configuration.addInstance("Messages", MessagesConstraintGenerator.class);
}
Also used : ValidateAnnotationConstraintGenerator(org.apache.tapestry5.internal.beaneditor.ValidateAnnotationConstraintGenerator) PrimitiveFieldConstraintGenerator(org.apache.tapestry5.internal.beaneditor.PrimitiveFieldConstraintGenerator)

Aggregations

PrimitiveFieldConstraintGenerator (org.apache.tapestry5.internal.beaneditor.PrimitiveFieldConstraintGenerator)1 ValidateAnnotationConstraintGenerator (org.apache.tapestry5.internal.beaneditor.ValidateAnnotationConstraintGenerator)1