public interface RequestValidator
| Modifier and Type | Method and Description |
|---|---|
boolean |
supports(Class<?> clazz)
Tells whether this validator supports the given type.
|
default void |
validate(Object requestBody)
Validates the given request body.
|
void |
validate(Object requestBody,
org.springframework.validation.Errors errors)
Validates the given request body.
|
boolean supports(Class<?> clazz)
clazz - the class of the instance that will be tested/validateddefault void validate(Object requestBody)
requestBody - the request body to validatecom.broadleafcommerce.common.error.validation.ValidationException - if the request body is invalidvoid validate(Object requestBody, org.springframework.validation.Errors errors)
requestBody - the request body to validateerrors - the errors to contribute to when validation errors occurCopyright © 2021. All rights reserved.