public class ValidationHelper extends Object
| Constructor and Description |
|---|
ValidationHelper(Object model,
RequestContext requestContext,
String eventId,
String modelName,
ExpressionParser expressionParser,
org.springframework.validation.MessageCodesResolver messageCodesResolver,
MappingResults mappingResults)
Create a throwaway validation helper object.
|
public ValidationHelper(Object model, RequestContext requestContext, String eventId, String modelName, ExpressionParser expressionParser, org.springframework.validation.MessageCodesResolver messageCodesResolver, MappingResults mappingResults)
validate() method.
Validation methods invoked include a validation method on the model object or a validator bean. The method name on either object is in the form of validate[viewStateId]. A ValidationContext is passed in the method signature along with the model object for validator beans. A MessageContext can be substituted for the ValidationContext.
For example: model.validateEnterBookingDetails(VaticationContext) or
context.getBean("modelValidator").validateEnterBookingDetails(model, VaticationContext)
model - the object to validaterequestContext - the context for the requesteventId - the event triggering validationmodelName - the name of the model objectexpressionParser - the expression parsermappingResults - object mapping results