bval-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Bauer <techhu...@gmail.com>
Subject Re: Regarding using or debugging BeanValidator
Date Tue, 01 Feb 2011 16:00:28 GMT
Hi Ankur,

The focus of the OpenJPA Bean Validation Primer[1] is primarily JPA-based
bean validation, but it also provides a view of various bean validation
concepts like constraints, validators, and validation groups.  The primer
needs to be updated to use the latest version of bval, but should still
work.  If you use the trunk or 2.1.x-SNAPSHOT build of the OpenJPA "all"
jar, it includes Apache bval and all necessary dependencies.

hth,
-Jeremy

[1] http://openjpa.apache.org/bean-validation-primer.html

On Mon, Jan 31, 2011 at 9:55 PM, ankur garg <ankurgarg.ism@gmail.com> wrote:

> 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