incubator-bval-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <>
Subject Re: Regarding using or debugging BeanValidator
Date Tue, 01 Feb 2011 10:19:12 GMT
hi Ankur!

You can basically validate any POJO which has a JSR-303 annotation on it.
Prominent examples of that being JPA entities, JSF backing beans, etc.

For getting into it I suggest to first checkout the sources

$> svn co bval

Now build it with maven [1] by simply going into 'cd bval' and invoking

$> mvn clean install

Voila! You now have a self compiled bval-0.3-incubating-SNAPSHOT in your local ~/.m2/repository/...

As examples for beans which get validated please see the classes in

Feel free to ping us back if you need more or have any detailed questions!



--- On Tue, 2/1/11, ankur garg <> wrote:

From: ankur garg <>
Subject: Regarding using or debugging BeanValidator
To: "" <>
Date: Tuesday, February 1, 2011, 3:55 AM

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();  
        public Validator getValidator() {            return avf.getValidator();  
     }            };        public abstract Validator getValidator(); 
I am not sure what sort of java bean I can validate, please help.


View raw message