Fixed: FS#998 - Mail filters: Foldernames may not start with a dot
| | |
| | | 'target' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,100}$/', |
| | | 'errmsg'=> 'target_error_regex'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | |
| | | $wb["rulename_error_empty"] = 'Name is empty.'; |
| | | $wb["searchterm_is_empty"] = 'Search term is empty.'; |
| | | $wb["source_txt"] = 'Source'; |
| | | $wb["target_error_regex"] = 'The target may only contain these characters: a-z, 0-9, -, . and _'; |
| | | ?> |
| | |
| | | // Set the mailuser_id |
| | | $this->dataRecord["mailuser_id"] = $mailuser["mailuser_id"]; |
| | | |
| | | // Remove leading dots |
| | | if(substr($this->dataRecord['target'],0,1) == '.') $this->dataRecord['target'] = substr($this->dataRecord['target'],1); |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |