bval-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ankur garg <ankurgarg....@gmail.com>
Subject Regarding using or debugging BeanValidator
Date Tue, 01 Feb 2011 03:55:44 GMT
Hi,

I am new to this project, Can you help me with sample source or any document
which can help me run beanValidator and setup a debug environment for the
project. I want to contribute by fixing bugs in the project. Any help will
be great.


I am trying to use following sample code:

package com;

import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;

import org.apache.bval.jsr303.ApacheValidationProvider;

public enum MyValidatorFactory
{

    SINGLE_INSTANCE
    {

        ValidatorFactory avf =
Validation.byProvider(ApacheValidationProvider.class).configure().buildValidatorFactory();

        @Override
        public Validator getValidator() {
            return avf.getValidator();
        }

    };

    public abstract Validator getValidator();
}

I am not sure what sort of java bean I can validate, please help.

Thanks,
Ankur

Mime
View raw message