protected CompositeValidator createValidator ( List < ValidatorMetaData > validationMetaDataList ) { /* * A field (property) can be associated with many validators so we use a * CompositeValidator to hold all of the validators associated with this * validator. */ CompositeValidator compositeValidator = new CompositeValidator ( ) ; // hold // all // of // the // validators // associated // with // the // field. /* * Lookup the list of validators for the current field and initialize * them with validation meta-data properties. */ List < FieldValidator > validatorsList = lookupTheListOfValidatorsAndInitializeThemWithMetaDataProperties ( validationMetaDataList ) ; compositeValidator . setValidatorList ( validatorsList ) ; return compositeValidator ; }
Create the validator by looking it up in the ObjectRegistry and then populating it with values from the meta - data list .