summaryrefslogtreecommitdiffstats
path: root/apps/admin/modules/user/validate
diff options
context:
space:
mode:
Diffstat (limited to 'apps/admin/modules/user/validate')
-rw-r--r--apps/admin/modules/user/validate/create.yml37
-rw-r--r--apps/admin/modules/user/validate/edit.yml40
-rw-r--r--apps/admin/modules/user/validate/login.yml24
-rw-r--r--apps/admin/modules/user/validate/settings.yml43
4 files changed, 144 insertions, 0 deletions
diff --git a/apps/admin/modules/user/validate/create.yml b/apps/admin/modules/user/validate/create.yml
new file mode 100644
index 0000000..7686c7b
--- /dev/null
+++ b/apps/admin/modules/user/validate/create.yml
@@ -0,0 +1,37 @@
+fillin:
+ enabled: true
+ param:
+ exclude_types: [password]
+
+validators:
+ myStringValidator:
+ class: sfStringValidator
+ param:
+ min: 2
+ min_error: This field is too short (2 characters minimum)
+ max: 100
+ max_error: This field is too long (100 characters maximum)
+
+fields:
+ user{nickname}:
+ required:
+ msg: The Username is required
+ sfStringValidator:
+ min: 5
+ min_error: Username must be 5 or more characters
+ sfPropelUniqueValidator:
+ class: User
+ column: nickname
+ unique_error: This Username does already exist
+ user{email}:
+ myStringValidator:
+ sfEmailValidator:
+ email_error: This E-Mail Address is invalid
+ user{password}:
+ required:
+ msg: You must define a password
+ myStringValidator:
+ user{role_id}:
+ required:
+ msg: You must set a role for this user
+
diff --git a/apps/admin/modules/user/validate/edit.yml b/apps/admin/modules/user/validate/edit.yml
new file mode 100644
index 0000000..6480b37
--- /dev/null
+++ b/apps/admin/modules/user/validate/edit.yml
@@ -0,0 +1,40 @@
+fillin:
+ enabled: true
+ param:
+ exclude_types: [password]
+
+validators:
+ myStringValidator:
+ class: sfStringValidator
+ param:
+ min: 2
+ min_error: This field is too short (2 characters minimum)
+ max: 100
+ max_error: This field is too long (100 characters maximum)
+
+fields:
+ user{nickname}:
+ required:
+ msg: The Username is required
+ sfStringValidator:
+ min: 5
+ min_error: Username must be 5 or more characters
+ sfPropelUniqueValidator:
+ class: User
+ column: nickname
+ unique_error: This Username does already exist
+ user{email}:
+ myStringValidator:
+ sfEmailValidator:
+ email_error: This E-Mail Address is invalid
+ user{role_id}:
+ required:
+ msg: You must set a role for this user
+ user{password}:
+ group: password_group
+ user{password2}:
+ group: password_group
+ sfCompareValidator:
+ check: "user[password]"
+ compare_error: The two passwords do not match
+
diff --git a/apps/admin/modules/user/validate/login.yml b/apps/admin/modules/user/validate/login.yml
new file mode 100644
index 0000000..d6ea563
--- /dev/null
+++ b/apps/admin/modules/user/validate/login.yml
@@ -0,0 +1,24 @@
+methods:
+ post: [nickname, password]
+
+names:
+ nickname:
+ required: true
+ required_msg: Your Username is required
+ validators: [nicknameValidator, userValidator]
+
+ password:
+ required: true
+ required_msg: Your password is required
+
+nicknameValidator:
+ class: sfStringValidator
+ param:
+ min: 5
+ min_error: Username must be 5 or more characters
+
+userValidator:
+ class: myLoginValidator
+ param:
+ password: password
+ login_error: This Username does not exist or you entered a wrong password
diff --git a/apps/admin/modules/user/validate/settings.yml b/apps/admin/modules/user/validate/settings.yml
new file mode 100644
index 0000000..0706d53
--- /dev/null
+++ b/apps/admin/modules/user/validate/settings.yml
@@ -0,0 +1,43 @@
+fillin:
+ enabled: true
+ param:
+ exclude_types: [password]
+
+validators:
+ myStringValidator:
+ class: sfStringValidator
+ param:
+ min: 2
+ min_error: This field is too short (2 characters minimum)
+ max: 100
+ max_error: This field is too long (100 characters maximum)
+
+fields:
+ nickname:
+ required:
+ msg: Your Username is required
+ sfStringValidator:
+ min: 5
+ min_error: Username must be 5 or more characters
+ myChangeNicknameValidator:
+ change_error: This Username does already exist
+
+ first_name:
+ myStringValidator:
+ last_name:
+ myStringValidator:
+
+ email:
+ required:
+ msg: Your must provide an E-Mail Address
+ myStringValidator:
+ sfEmailValidator:
+ email_error: This E-Mail Address is invalid
+
+ password1:
+ group: password_group
+ password2:
+ group: password_group
+ sfCompareValidator:
+ check: password1
+ compare_error: The two passwords do not match