Skip to content

Commit aa4c285

Browse files
committed
Current version, still trying to find the random issues
1 parent d2f6c7f commit aa4c285

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/main/java/org/javawebstack/validator/Validator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ private Map<String[], List<String>> check(Map<String[], List<ValidationRule>> ru
149149
for(ValidationRule rule : getMapValue(rules, keyPrefix)){
150150
String error = rule.validate(this, element);
151151
if(error != null){
152+
//System.out.println(String.join(".", resolvedKeyPrefix));
153+
//System.out.println(rule.toString());
152154
if(!errors.containsKey(resolvedKeyPrefix))
153155
errors.put(resolvedKeyPrefix, new ArrayList<>());
154156
errors.get(resolvedKeyPrefix).add(error);

src/main/java/org/javawebstack/validator/rule/IntegerRule.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,13 @@ public String validate(Validator validator, GraphElement value) {
5757
return String.format("Not in steps of %d", step);
5858
return null;
5959
}
60+
61+
public String toString() {
62+
return "IntegerRule{" +
63+
"min=" + min +
64+
", max=" + max +
65+
", step=" + step +
66+
'}';
67+
}
68+
6069
}

0 commit comments

Comments
 (0)