final HibernateValidatorConfiguration config = getConfiguration( HibernateValidator.class );
ConstraintMapping mapping = config.createConstraintMapping();
mapping.type( Product.class )
.property( "productNumber", FIELD )
.constraint(
new Mod11CheckDef()
.threshold( Integer.MAX_VALUE )
.startIndex( 0 )
.endIndex( 12 )
.ignoreNonDigitCharacters( true )
.treatCheck10As( 'X' )