public function addValidator($validator)
    {
        if ($validator === FormField::TYPE_FILE)
        {
            $this->is_file = true;
            $validator = Type::RESOURCE;
        }

        if (!$validator instanceof Validator)
        {
            $validator = new Validator($validator, ['unstrict' => true]);
        }

        $this->validators[] = $validator;
        return $this;
    }