Overtrue\Validation\Validator::validateBoolean PHP Method

validateBoolean() protected method

Validate that an attribute is a boolean.
protected validateBoolean ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
return boolean
    protected function validateBoolean($attribute, $value)
    {
        $acceptable = [true, false, 0, 1, '0', '1'];
        return in_array($value, $acceptable, true);
    }
Validator