Message: Internal error while using the pattern "(http://)?(www.)?(youtu)((be.com)|(.be))/.*"
$element = new Zend_Form_Element_Text($this->name);
$element->setRequired(true)
->setLabel(FileTypes::$names[$this->fileType])
->setDescription('Paste YouTube link here')
->setDecorators(FormDecorators::$simpleElementDecorators)
->addValidator('regex', false, '(http://)?(www\.)?(youtu)((be\.com)|(\.be))/.*');
Throws error even with simple regular expression.