Skip to content

Commit

Permalink
Parse boolean string properly
Browse files Browse the repository at this point in the history
  • Loading branch information
xHeaven committed Dec 30, 2024
1 parent 779ce60 commit b32a68d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Attributes/Validation/ValidationAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ protected static function parseBooleanValue(mixed $value): mixed
}

if ($value === 'true' || $value === '1') {
return true;
return 'true';
}

if ($value === 'false' || $value === '0') {
return true;
return 'false';
}

return $value;
Expand Down

0 comments on commit b32a68d

Please sign in to comment.