Example usage for org.springframework.web.bind WebDataBinder setValidator

List of usage examples for org.springframework.web.bind WebDataBinder setValidator

Introduction

In this page you can find the example usage for org.springframework.web.bind WebDataBinder setValidator.

Prototype

public void setValidator(@Nullable Validator validator) 

Source Link

Document

Set the Validator to apply after each binding step.

Usage

From source file:ru.org.linux.topic.EditTopicController.java

@InitBinder("form")
public void requestValidator(WebDataBinder binder) {
    binder.setValidator(new EditTopicRequestValidator());

    binder.setBindingErrorProcessor(new ExceptionBindingErrorProcessor());
}

From source file:ru.org.linux.user.RegisterController.java

@InitBinder("form")
public void requestValidator(WebDataBinder binder) {
    binder.setValidator(new RegisterRequestValidator());

    binder.setBindingErrorProcessor(new ExceptionBindingErrorProcessor());
}

From source file:uk.ac.ebi.metabolights.controller.UserAccountController.java

@InitBinder
protected void initBinder(WebDataBinder binder) {
    binder.setValidator(new ValidatorMetabolightsUser());
}