Package org.springmodules.validation.bean.converter

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


     * @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 DefaultErrorCodeConverter();
    }
View Full Code Here


        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 DefaultErrorCodeConverter());
        validator.setConfigurationLoader(loader);

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

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

        BeanValidator validator = new BeanValidator(loader);

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

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

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

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

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

TOP

Related Classes of org.springmodules.validation.bean.converter.DefaultErrorCodeConverter

Copyright © 2018 www.massapicom. 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.