Skip to content

Commit

Permalink
Update checks
Browse files Browse the repository at this point in the history
  • Loading branch information
eldadfux committed Jun 21, 2020
1 parent 1a4ce3f commit 0820938
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Validator/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public function isValid($value)
return true;
}

if($this->loose && ($value === '1' || $value === '0')) { // Accept numeric strings
return true;
}

if($this->loose && ($value === 1 || $value === 0)) { // Accept integers
return true;
}
Expand Down

0 comments on commit 0820938

Please sign in to comment.