private function callFilters($value, ValidationField $field, bool &$validated = false) {
        // Strip array references in the name except for the last one.
        $key = $field->getSchemaPath();
        if (!empty($this->filters[$key])) {
            foreach ($this->filters[$key] as list($filter, $validate)) {
                $value = call_user_func($filter, $value, $field);
                $validated |= $validate;

                if (Invalid::isInvalid($value)) {
                    return $value;
                }
            }
        }
        $key = '/format/'.$field->val('format');
        if (!empty($this->filters[$key])) {
            foreach ($this->filters[$key] as list($filter, $validate)) {
                $value = call_user_func($filter, $value, $field);
                $validated |= $validate;

                if (Invalid::isInvalid($value)) {
                    return $value;
                }
            }
        }

        return $value;
    }