Skip to content

Commit 5a5cfe4

Browse files
committed
Added javadoc for types
1 parent b3a3862 commit 5a5cfe4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/dev/ditsche/validator/Validator.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ public Validator add(Validatable validatable) {
7676
return this;
7777
}
7878

79+
/**
80+
* Validates an object against a schema and returns an error bag.
81+
* Sets abort early to false.
82+
*
83+
* @param object The object that need to be validated.
84+
* @param <T> The type of the validated object.
85+
* @return The validated object.
86+
*/
7987
public <T> T validate(T object) {
8088
return validate(object, false);
8189
}
@@ -84,6 +92,8 @@ public <T> T validate(T object) {
8492
* Validates an object against a schema and returns an error bag.
8593
*
8694
* @param object The object that need to be validated.
95+
* @param <T> The type of the validated object.
96+
* @return The validated object.
8797
*/
8898
public <T> T validate(T object, boolean abortEarly) {
8999
errorBag.clear();

0 commit comments

Comments
 (0)