diff options
author | mszulecki | 2009-12-23 21:07:38 +0000 |
---|---|---|
committer | mszulecki | 2009-12-23 21:07:38 +0000 |
commit | 1ad5e19dde3dcdaf6f5188764726eae9c2d13672 (patch) | |
tree | cad51509d37fad55f62c44a5e5fac008cf71cad2 /apps | |
parent | 98fea044acc8e00277d7bdf904843e75b9cb5539 (diff) | |
download | mailadmin-1ad5e19dde3dcdaf6f5188764726eae9c2d13672.tar.gz mailadmin-1ad5e19dde3dcdaf6f5188764726eae9c2d13672.tar.bz2 |
Do not allow uppercase characters in mailbox name
git-svn-id: http://svn.sukimashita.com/repos/mailadmin/trunk@8 4281df72-ff29-0410-8fee-2d9ac0c5f5a7
Diffstat (limited to 'apps')
-rw-r--r-- | apps/admin/modules/mailbox/validate/create.yml | 9 | ||||
-rw-r--r-- | apps/admin/modules/mailbox/validate/edit.yml | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/admin/modules/mailbox/validate/create.yml b/apps/admin/modules/mailbox/validate/create.yml index 2148f51..f04c2fa 100644 --- a/apps/admin/modules/mailbox/validate/create.yml +++ b/apps/admin/modules/mailbox/validate/create.yml @@ -18,14 +18,21 @@ validators: min_error: The password is too short (5 characters minimum) max: 100 max_error: The password is too long (100 characters maximum) + myLowercaseValidator: + class: sfRegexValidator + param: + match: No + match_error: 'Uppercase characters are not allowed' + pattern: '/[A-Z]+/' fields: mailbox{name}: required: msg: The Username is required myStringValidator: + myLowercaseValidator: sfRegexValidator: - match:..........Yes + match: Yes match_error: 'The characters ".,;@/" and whitespaces are not allowed' pattern: '/^[^\.\s,;@\/]+$/i' myDenyStringValidator: diff --git a/apps/admin/modules/mailbox/validate/edit.yml b/apps/admin/modules/mailbox/validate/edit.yml index fe94818..1395773 100644 --- a/apps/admin/modules/mailbox/validate/edit.yml +++ b/apps/admin/modules/mailbox/validate/edit.yml @@ -18,14 +18,21 @@ validators: min_error: The password is too short (5 characters minimum) max: 100 max_error: The password is too long (100 characters maximum) + myLowercaseValidator: + class: sfRegexValidator + param: + match: No + match_error: 'Uppercase characters are not allowed' + pattern: '/[A-Z]+/' fields: mailbox{name}: required: msg: The Username is required myStringValidator: + myLowercaseValidator: sfRegexValidator: - match:..........Yes + match: Yes match_error: 'The characters ".,;@/" and whitespaces are not allowed' pattern: '/^[^\.\s,;@\/]+$/i' myDenyStringValidator: |