Package dev.voidframework.validation
Class Validation
java.lang.Object
dev.voidframework.validation.Validation
This service provides methods for validating an object (JSR 380).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Validation
public Validation()Build a new instance.
-
-
Method Details
-
validate
Validates an object.- Type Parameters:
T- Type of the object to validate- Parameters:
objectToValidate- The object to validate- Returns:
- The validated object
-
validate
public <T> Validated<T> validate(T objectToValidate, Locale locale, Class<?>... constraintGroupArray) Validates an object.- Type Parameters:
T- Type of the object to validate- Parameters:
objectToValidate- The object to validatelocale- The locale to use for validation error messageconstraintGroupArray- The constraint groups to apply (OPTIONAL)- Returns:
- The validated object
-