<commit_before>Guice method validator
======================
[![Build Status](https://travis-ci.org/xvik/guice-validator.svg?branch=master)](https://travis-ci.org/xvik/guice-validator)

Integrates guice with javax.validation 1.1 method validators (aka allows to use validation annotations for method parameters and return value validation)

Usage tested with hibernate validator (http://hibernate.org/validator/)

Required dependencies:
'org.hibernate:hibernate-validator:5.1.1.Final'
'org.glassfish.web:javax.el:2.2.6'

Include ValidationModule in your module configuration:
install(new ValidationModule());

Optionally, ValidatorFactory instance may be provided to module constructor to re-use already configured instance or
simply fine-tune factory for your needs.

After that use annotations on methods to check method parameters or return values, like
public void action(@NotNull @Valid SimpleBean bean)

To activate runtime checks use @ValidateOnExecution on class to enable for all methods or on exact methods.
Using this annotation to activate checks a bit contradict with javadoc, but allows using annotation not just for 
runtime checks but also for compile time checks (using hibernate validator annotation processor)

Various usage examples could be find in tests.
Otherwise, consult with hibernate-validator documentation: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/

Most useful:
base annotations and general usage: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/chapter-bean-constraints.html
writing custom annotations: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/validator-customconstraints.html
factory configuration: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/chapter-bootstrapping.html
using annotation processor (compile time checks): http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/validator-annotation-processor.html

<commit_msg>bintray badge<commit_after>Guice method validator
======================
[![Build Status](https://travis-ci.org/xvik/guice-validator.svg?branch=master)](https://travis-ci.org/xvik/guice-validator)
[ ![Download](https://api.bintray.com/packages/vyarus/xvik/guice-validator/images/download.png) ](https://bintray.com/vyarus/xvik/guice-validator/_latestVersion)

Integrates guice with javax.validation 1.1 method validators (aka allows to use validation annotations for method parameters and return value validation)

Usage tested with hibernate validator (http://hibernate.org/validator/)

Required dependencies:
'org.hibernate:hibernate-validator:5.1.1.Final'
'org.glassfish.web:javax.el:2.2.6'

Include ValidationModule in your module configuration:
install(new ValidationModule());

Optionally, ValidatorFactory instance may be provided to module constructor to re-use already configured instance or
simply fine-tune factory for your needs.

After that use annotations on methods to check method parameters or return values, like
public void action(@NotNull @Valid SimpleBean bean)

To activate runtime checks use @ValidateOnExecution on class to enable for all methods or on exact methods.
Using this annotation to activate checks a bit contradict with javadoc, but allows using annotation not just for 
runtime checks but also for compile time checks (using hibernate validator annotation processor)

Various usage examples could be find in tests.
Otherwise, consult with hibernate-validator documentation: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/

Most useful:
base annotations and general usage: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/chapter-bean-constraints.html
writing custom annotations: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/validator-customconstraints.html
factory configuration: http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/chapter-bootstrapping.html
using annotation processor (compile time checks): http://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/validator-annotation-processor.html


{'fraction_non_alphanumeric': 0.1030347528144885, 'fraction_numerical': 0.00881057268722467, 'mean_word_length': 5.689034369885434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '551705', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1101, 'n_words': 339}