Skip to content

Commit 914f840

Browse files
committed
Add a ProviderValidators for custom the behaviour of Custom Validators dynamically
1 parent b534e65 commit 914f840

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ class JavascriptFormatValidator implements FormatValidator {
482482
try {
483483
Boolean result = (Boolean) javaScriptEngine.eval(script);
484484
if (!result) {
485-
return Optional.of(String.format("the length of string [%s] is greater than 5", subject));
485+
return Optional.of(String.format("the length of string [%s] is not equal 5", subject));
486486
}
487487
} catch (ScriptException e) {
488488
e.printStackTrace();

core/src/test/java/org/everit/json/schema/loader/SchemaLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ public Optional<String> validate(String subject) {
851851
try {
852852
Boolean result = (Boolean) javaScriptEngine.eval(script);
853853
if (!result) {
854-
return Optional.of(String.format("the length of string [%s] is greater than 5", subject));
854+
return Optional.of(String.format("the length of string [%s] is not equal 5", subject));
855855
}
856856
} catch (ScriptException e) {
857857
e.printStackTrace();

0 commit comments

Comments
 (0)