Merge pull request #151 from laverboy/patch-1

add string '1' as acceptable accepted value
This commit is contained in:
Willem Wollebrants 2016-03-15 21:59:55 +01:00
commit 9636bfaf19

View File

@ -186,7 +186,7 @@ class Validator
*/ */
protected function validateAccepted($field, $value) protected function validateAccepted($field, $value)
{ {
$acceptable = array('yes', 'on', 1, true); $acceptable = array('yes', 'on', 1, '1', true);
return $this->validateRequired($field, $value) && in_array($value, $acceptable, true); return $this->validateRequired($field, $value) && in_array($value, $acceptable, true);
} }