public function certified()
    {
        if (!is_null($this->submitted)) {
            return $this->certified; // so we don't overwrite error messages
        }
        $errors = array();
        $this->values = array();
        $this->submitted = false;
        foreach ($this->data as $field => $data) {
            if (!is_null($data['value'])) {
                $this->submitted = true;
            }
            if (!empty($data['value'])) {
                $this->values[$field] = $data['value'];
            } elseif (strpos($field, '[]') !== false) {
                $this->values[$field] = array();
            } else {
                $this->values[$field] = (isset($data['rules']['default'])) ? $data['rules']['default'] : '';
            }
            if (!is_null($data['error'])) {
                $errors[$field] = $data['error'];
            }
        }
        if ($this->submitted) {
            $submitted = array();
            foreach ($this->data as $field => $data) {
                $value = &$submitted;
                foreach ($data['field'] as $index) {
                    $value = &$value[$index];
                }
                $value = $this->values[$field];
                if (isset($data['rules']['required']) && empty($value)) {
                    $errors[$field] = $this->errorMessage('required');
                } elseif (!isset($errors[$field])) {
                    if (isset($data['rules']['equalTo']) && $value != $this->value($data['rules']['equalTo'])) {
                        $errors[$field] = $this->errorMessage('equalTo');
                    } elseif (isset($data['rules']['notEqualTo']) && $value == $this->value($data['rules']['notEqualTo'])) {
                        $errors[$field] = $this->errorMessage('notEqualTo');
                    }
                }
            }
            $this->certified = (!empty($errors)) ? false : $submitted;
        }
        $this->errors = $errors;

        return $this->certified;
    }