Garden\Schema::validateObject PHP Method

validateObject() protected method

Validate an object.
protected validateObject ( &$value, array $field, Validation $validation ) : boolean
$field array The field definition.
$validation Validation The validation results to add.
return boolean Returns true if {@link $value} is valid or false otherwise.
    protected function validateObject(&$value, array $field, Validation $validation)
    {
        if (!is_array($value) || isset($value[0])) {
            return false;
        } elseif (isset($field['properties'])) {
            $path = self::arraySelect(['path', 'name'], $field);
            // Validate the data against the internal schema.
            $this->isValidInternal($value, $field['properties'], $validation, $path . '.');
        }
        return true;
    }