We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffee4a5 commit 184bfe1Copy full SHA for 184bfe1
1 file changed
app/helpers/MetaFormats/Validators/VBool.php
@@ -12,7 +12,11 @@ class VBool
12
13
public function validate(mixed $value)
14
{
15
- // support stringified values as well
16
- return MetaFormatHelper::checkType($value, PhpTypes::Bool) || $value == "true" || $value == "false";
+ // support stringified values as well as 0 and 1
+ return MetaFormatHelper::checkType($value, PhpTypes::Bool)
17
+ || $value == 0
18
+ || $value == 1
19
+ || $value == "true"
20
+ || $value == "false";
21
}
22
0 commit comments