public function setData($data)
    {
        switch ($data['mode']) {
            default:
                break;

            case AtsModeInterface::MODE_URI:
                $this->add(
                    array(
                    'name' => 'uri',
                    'validators' => array(
                        array(
                            'name' => 'uri',
                            'options' => array(
                                'allowRelative' => false,
                            ),
                        ),
                    ),
                    'filters'  => array(
                        array('name' => 'StripTags'),
                    ),
                    )
                );
                break;

            case AtsModeInterface::MODE_EMAIL:
                $this->add(
                    array(
                    'name' => 'email',
                    'validators' => array(
                        array('name' => 'EmailAddress')
                    ),
                    )
                );
                break;
        }
        
        $this->add([
            'name' => 'oneClickApplyProfiles',
            'required' => $data['mode'] == AtsModeInterface::MODE_INTERN && $data['oneClickApply']
        ]);

        return parent::setData($data);
    }