public class BeanFieldValidatorDefaultSource extends Object implements FieldValidatorDefaultSource
Constructor and Description |
---|
BeanFieldValidatorDefaultSource(FieldValidatorDefaultSource fieldValidatorDefaultSource,
ValidatorFactory validatorFactory,
BeanValidatorGroupSource beanValidationGroupSource,
ClientConstraintDescriptorSource clientValidatorSource,
FormSupport formSupport,
Environment environment) |
Modifier and Type | Method and Description |
---|---|
FieldValidator |
createDefaultValidator(ComponentResources resources,
String parameterName)
A convenience for the full version; assumes that the resources are associated with a
Field . |
FieldValidator |
createDefaultValidator(Field field,
String overrideId,
Messages overrideMessages,
Locale locale,
Class propertyType,
AnnotationProvider propertyAnnotations)
Analyzes the property type and property annotations to determine the default set of validations for the property,
which are wrapped to form a
FieldValidator for a field. |
public BeanFieldValidatorDefaultSource(@Core FieldValidatorDefaultSource fieldValidatorDefaultSource, ValidatorFactory validatorFactory, BeanValidatorGroupSource beanValidationGroupSource, ClientConstraintDescriptorSource clientValidatorSource, FormSupport formSupport, Environment environment)
public FieldValidator createDefaultValidator(Field field, String overrideId, Messages overrideMessages, Locale locale, Class propertyType, AnnotationProvider propertyAnnotations)
FieldValidatorDefaultSource
FieldValidator
for a field.createDefaultValidator
in interface FieldValidatorDefaultSource
field
- Field component for which a validator is being createdoverrideId
- the id of the component, used to locate related messages for labels and errorsoverrideMessages
- where to search for label and error messageslocale
- locale used for locating messagespropertyType
- type of property bound to the editting parameter of the field (typically, the
parameter named "value").propertyAnnotations
- source of annotations for the property being edittedpublic FieldValidator createDefaultValidator(ComponentResources resources, String parameterName)
FieldValidatorDefaultSource
Field
.createDefaultValidator
in interface FieldValidatorDefaultSource
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.