Skip to content

Commit

Permalink
Add a ProviderValidators for custom the behaviour of Custom Validator…
Browse files Browse the repository at this point in the history
…s dynamically
  • Loading branch information
GiskardB committed Apr 25, 2020
1 parent b534e65 commit 914f840
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ class JavascriptFormatValidator implements FormatValidator {
try {
Boolean result = (Boolean) javaScriptEngine.eval(script);
if (!result) {
return Optional.of(String.format("the length of string [%s] is greater than 5", subject));
return Optional.of(String.format("the length of string [%s] is not equal 5", subject));
}
} catch (ScriptException e) {
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ public Optional<String> validate(String subject) {
try {
Boolean result = (Boolean) javaScriptEngine.eval(script);
if (!result) {
return Optional.of(String.format("the length of string [%s] is greater than 5", subject));
return Optional.of(String.format("the length of string [%s] is not equal 5", subject));
}
} catch (ScriptException e) {
e.printStackTrace();
Expand Down

0 comments on commit 914f840

Please sign in to comment.