Package dev.voidframework.validation
Class Validation
java.lang.Object
dev.voidframework.validation.Validation
This service provides methods for validating an object (JSR 380).
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Validation
public Validation()Build a new instance.- Since:
- 1.0.0
-
-
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
- Since:
- 1.0.0
-
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
- Since:
- 1.2.0
-