Skip to content

Commit 79869a6

Browse files
committed
adding some javadoc to FormatValidator#validate()
1 parent 3ccff26 commit 79869a6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/src/main/java/org/everit/json/schema/FormatValidator.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ static FormatValidator forFormat(final String formatName) {
7474
}
7575
}
7676

77+
/**
78+
* Implementation-specific validation of {@code subject}. If a validation error occurs then
79+
* implementations should return a programmer-friendly error message as a String wrapped in an
80+
* Optional. If the validation succeeded then {@link Optional#empty() an empty optional} should be
81+
* returned.
82+
*
83+
* @param subject
84+
* the string to be validated
85+
* @return an {@code Optional} wrapping the error message if a validation error occured, otherwise
86+
* {@link Optional#empty() an empty optional}.
87+
*/
7788
Optional<String> validate(String subject);
7889

7990
}

0 commit comments

Comments
 (0)