Added port number validation to livestream preferences

This commit is contained in:
Robb Ebright 2017-03-19 12:02:45 -04:00
parent 9fe31a5923
commit eb3a1b1ed5
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
$masterSourcePort = new Zend_Form_Element_Text('master_source_port');
$masterSourcePort->setLabel(_('Master Source Port:'))
->setValue($m_port)
->setValidators(array($betweenValidator))
->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>_('Only numbers are allowed.'))));
$this->addElement($masterSourcePort);