From 1ad5e19dde3dcdaf6f5188764726eae9c2d13672 Mon Sep 17 00:00:00 2001 From: mszulecki Date: Wed, 23 Dec 2009 21:07:38 +0000 Subject: Do not allow uppercase characters in mailbox name git-svn-id: http://svn.sukimashita.com/repos/mailadmin/trunk@8 4281df72-ff29-0410-8fee-2d9ac0c5f5a7 --- apps/admin/modules/mailbox/validate/create.yml | 9 ++++++++- apps/admin/modules/mailbox/validate/edit.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'apps') 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: -- cgit v1.1-32-gdbae