protected function validateBool($field)
    {
        $value = $this->getSubmitted($field);

        if (!isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $this->setSubmitted($field, (int) filter_var($value, FILTER_VALIDATE_BOOLEAN));
        return true;
    }
protected function validateBool($field)
    {
        $value = $this->getSubmitted($field);

        if (!isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $this->setSubmitted($field, (int) filter_var($value, FILTER_VALIDATE_BOOLEAN));
        return true;
    }
protected function validateBool ( $ field ) { $ value = $ this -> getSubmitted ( $ field ) ; if ( ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ this -> setSubmitted ( $ field , ( int ) filter_var ( $ value , FILTER_VALIDATE_BOOLEAN ) ) ; return true ; }
Convert different values into boolean
@param mixed $field
@return bool|null
Convert different values into boolean