src/Schema.php
protected function validateBoolean($value, ValidationField $field) {
        $value = $value === null ? $value : filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
        if ($value === null) {
            $field->addTypeError($value, 'boolean');
            return Invalid::value();
        }

        return $value;
    }
protected function validateBoolean($value, ValidationField $field) {
        $value = $value === null ? $value : filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
        if ($value === null) {
            $field->addTypeError($value, 'boolean');
            return Invalid::value();
        }

        return $value;
    }
protected function validateBoolean ( $ value , ValidationField $ field ) { $ value = $ value === null ? $ value : filter_var ( $ value , FILTER_VALIDATE_BOOLEAN , FILTER_NULL_ON_FAILURE ) ; if ( $ value === null ) { $ field -> addTypeError ( $ value , 'boolean' ) ; return Invalid :: value ( ) ; } return $ value ; }
Validate a boolean value.

@param mixed $value The value to validate.
@param ValidationField $field The validation results to add.
@return bool|Invalid Returns the cleaned value or invalid if validation fails.
Validate a boolean value .