Skip to content

dkvarshney/bouncer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bouncer

A simple but powerful library for validations in Java.

Example 1: Attribute Validations

String something = "hello"; Bouncer.makeSure("Attribute", something)	.isNotBlank()	.isNotLongerThan(10)	.isNotShorterThan(5)	... many more. 

Example 2: Object Validations

class Employee {	@StringLengthRange(minLength = 4)	@NotNull	String id;	@StringLengthRange(minLength = 4, maxLength = 64)	@NotNull	String name;	@StringAnyOf(values = {"IT", "HR", "SALES"})	@NotNull	String department;	@StringValidUrl	String profileUrl; } 

And the validation:

Employee emp = something. Bouncer.validate(emp); 

About

Easy attribute, field and object validation library for Java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages