Added the dash in the explanations of the allowed character in the project name
This is solving issue 148 correctly.
This commit is contained in:
parent
f25ebc1664
commit
9f673307e0
@ -60,7 +60,7 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form
|
||||
array('required' => true,
|
||||
'label' => __('Shortname'),
|
||||
'initial' => '',
|
||||
'help_text' => __('It must be unique for each project and composed only of letters and digits.'),
|
||||
'help_text' => __('It must be unique for each project and composed only of letters, digits and dash (-) like "my-project".'),
|
||||
));
|
||||
|
||||
$this->fields['scm'] = new Pluf_Form_Field_Varchar(
|
||||
@ -150,7 +150,7 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form
|
||||
{
|
||||
$shortname = $this->cleaned_data['shortname'];
|
||||
if (preg_match('/[^\-A-Za-z0-9]/', $shortname)) {
|
||||
throw new Pluf_Form_Invalid(__('This shortname contains illegal characters, please use only letters and digits.'));
|
||||
throw new Pluf_Form_Invalid(__('This shortname contains illegal characters, please use only letters, digits and dash (-).'));
|
||||
}
|
||||
if (mb_substr($shortname, 0, 1) == '-') {
|
||||
throw new Pluf_Form_Invalid(__('The shortname cannot start with the dash (-) character.'));
|
||||
|
Loading…
Reference in New Issue
Block a user