Skip to content

Commit e1776f5

Browse files
committed
fixes #103 Boolean type validation for the string type is incorrect
1 parent baab1d9 commit e1776f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/networknt/schema/TypeValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static boolean isInteger(String str) {
108108
}
109109

110110
public static boolean isBoolean(String s) {
111-
return Boolean.parseBoolean(s);
111+
return "true".equals(s) || "false".equals(s);
112112
}
113113

114114
public static boolean isNumeric(String str) {

0 commit comments

Comments
 (0)