public function validates($data, $options = [])
    {
        $events = (array) (isset($options['events']) ? $options['events'] : null);

        $this->_errors = [];
        $error = $this->_error;

        foreach ($this->_rules as $field => $rules) {
            $values = static::values($data, explode('.', $field));

            foreach ($rules as $name => $rule) {
                $rule += $options;
                $rule['field'] = $field;

                if ($events && $rule['on'] && !array_intersect($events, (array) $rule['on'])) {
                    continue;
                }

                if (!$values && $rule['required']) {
                    $rule['message'] = null;
                    $this->_errors[$field][] = $error('required', $rule, $this->_meta);
                    break;
                } else {
                    foreach ($values as $key => $value) {
                        if (empty($value) && $rule['skipEmpty']) {
                            continue;
                        }
                        if (!$this->is($name, $value, $rule + compact('data'), $params)) {
                            $this->_errors[$key][] = $error($name, $params + $rule, $this->_meta);
                        }
                    }
                }
            }
        }
        return !$this->_errors;
    }