private function validate() {
        $filterer = new Filterer();
        $valid = true;
        foreach ($this->elements as $element) {
            if (!$element->validate($filterer, $this->data))
                $valid = false;
            $this->data[$element->name] = ($element->type === 'fieldset') ?
                    $element->options->value->getData(true) : $element->data;
        }
        $this->valid = $valid;
        return $valid;
    }