Examples of ModelAwareErrorCodeConverter


Examples of org.springmodules.validation.bean.converter.ModelAwareErrorCodeConverter

        personValidationConfiguration.addPropertyRule("name", new DefaultValidationRule(Conditions.minLength("name", 5), "minLength"));
        SimpleBeanValidationConfigurationLoader loader = new SimpleBeanValidationConfigurationLoader();
        loader.setClassValidation(Person.class, personValidationConfiguration);

        BeanValidator validator = new BeanValidator();
        validator.setErrorCodeConverter(new ModelAwareErrorCodeConverter());
        validator.setConfigurationLoader(loader);

        Person person = new Person("Uri");
        BindException errors = new BindException(person, "person");
View Full Code Here

Examples of org.springmodules.validation.bean.converter.ModelAwareErrorCodeConverter

        SimpleBeanValidationConfigurationLoader loader = new SimpleBeanValidationConfigurationLoader();
        loader.setClassValidation(Person.class, personValidationConfiguration);

        BeanValidator validator = new BeanValidator(loader);

        validator.setErrorCodeConverter(new ModelAwareErrorCodeConverter());
        validator.setConfigurationLoader(loader);

        Person person = new Person("Uri");
        BindException errors = new BindException(person, "person");
View Full Code Here

Examples of org.springmodules.validation.bean.converter.ModelAwareErrorCodeConverter

        loader.setResource(new ClassPathResource("validation.xml", getClass()));
        loader.setElementHandlerRegistry(registry);
        loader.afterPropertiesSet();

        BeanValidator validator = new BeanValidator(loader);
        validator.setErrorCodeConverter(new ModelAwareErrorCodeConverter());

        Person person = new Person("Uri");
        person.setHomeless(false);
        person.setAddress(new Address(null, "Amsterdam"));
        BindException errors = new BindException(person, "person");
View Full Code Here

Examples of org.springmodules.validation.bean.converter.ModelAwareErrorCodeConverter

     * @param configurationLoader The {@link org.springmodules.validation.bean.conf.loader.BeanValidationConfigurationLoader} that is used to load the bean validation
     * configuration.
     */
    public BeanValidator(BeanValidationConfigurationLoader configurationLoader) {
        this.configurationLoader = configurationLoader;
        errorCodeConverter = new ModelAwareErrorCodeConverter();
    }
View Full Code Here

Examples of org.springmodules.validation.bean.converter.ModelAwareErrorCodeConverter

     * @param configurationLoader The {@link org.springmodules.validation.bean.conf.loader.BeanValidationConfigurationLoader} that is used to load the bean validation
     * configuration.
     */
    public BeanValidator(BeanValidationConfigurationLoader configurationLoader) {
        this.configurationLoader = configurationLoader;
        errorCodeConverter = new ModelAwareErrorCodeConverter();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.