You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// isBoolean is the validation function for validating if the current field's value can be safely converted to a boolean.
1487
+
// isBoolean is the validation function for validating if the current field's value is a valid boolean value or can be safely converted to a boolean value.
1488
1488
funcisBoolean(flFieldLevel) bool {
1489
-
_, err:=strconv.ParseBool(fl.Field().String())
1490
-
returnerr==nil
1489
+
switchfl.Field().Kind() {
1490
+
casereflect.Bool:
1491
+
returntrue
1492
+
default:
1493
+
_, err:=strconv.ParseBool(fl.Field().String())
1494
+
returnerr==nil
1495
+
}
1491
1496
}
1492
1497
1493
1498
// isDefault is the opposite of required aka hasValue
0 commit comments