CC-3218: Stream-settings: Spaces and other illegal characters should not be

allowed in the fields: server, username, password, URL, and mount point

- adding an another mask for domain name. Front and backend
This commit is contained in:
james 2011-12-22 15:35:46 -05:00
parent 30b192a809
commit 9665c970af
2 changed files with 6 additions and 4 deletions

View file

@ -84,12 +84,12 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
$host->setLabel("Server")
->setValue(isset($setting[$prefix.'_host'])?$setting[$prefix.'_host']:"")
->setValidators(array(
array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered'))))
array('regex', false, array('/^[0-9a-zA-Z-_.]+$/', 'messages' => 'Invalid character entered'))))
->setDecorators(array('ViewHelper'));
if($disable_all){
$host->setAttrib("disabled", "disabled");
}
$host->setAttrib('alt', 'regular_text');
$host->setAttrib('alt', 'domain');
$this->addElement($host);
$port = new Zend_Form_Element_Text('port');