diff --git a/app/models/user.rb b/app/models/user.rb index 93b73dd7a..5297b31b0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -46,8 +46,7 @@ class User < ActiveRecord::Base validates_length_of :firstname, :lastname, :maximum => 30 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true validates_length_of :mail, :maximum => 60, :allow_nil => true - # Password length between 4 and 12 - validates_length_of :password, :in => 4..12, :allow_nil => true + validates_length_of :password, :minimum => 4, :allow_nil => true validates_confirmation_of :password, :allow_nil => true validates_associated :custom_values, :on => :update diff --git a/app/views/account/password_recovery.rhtml b/app/views/account/password_recovery.rhtml index 439ab11b5..7fdd2b2fd 100644 --- a/app/views/account/password_recovery.rhtml +++ b/app/views/account/password_recovery.rhtml @@ -6,7 +6,7 @@

<%= password_field_tag 'new_password', nil, :size => 25 %>
-<%= l(:text_length_between, 4, 12) %>

+<%= l(:text_caracters_minimum, 4) %>

<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %>

diff --git a/app/views/account/register.rhtml b/app/views/account/register.rhtml index f04bfbb0e..c1425a380 100644 --- a/app/views/account/register.rhtml +++ b/app/views/account/register.rhtml @@ -9,7 +9,8 @@ <%= text_field 'user', 'login', :size => 25 %>

-<%= password_field_tag 'password', nil, :size => 25 %>

+<%= password_field_tag 'password', nil, :size => 25 %>
+<%= l(:text_caracters_minimum, 4) %>

<%= password_field_tag 'password_confirmation', nil, :size => 25 %>

diff --git a/app/views/my/password.rhtml b/app/views/my/password.rhtml index 217a8758e..2e9fd0fa4 100644 --- a/app/views/my/password.rhtml +++ b/app/views/my/password.rhtml @@ -9,7 +9,7 @@

<%= password_field_tag 'new_password', nil, :size => 25 %>
-<%= l(:text_length_between, 4, 12) %>

+<%= l(:text_caracters_minimum, 4) %>

<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %>

diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml index 72cf3c95c..d32399c60 100644 --- a/app/views/users/_form.rhtml +++ b/app/views/users/_form.rhtml @@ -24,7 +24,7 @@

<%= password_field_tag 'password', nil, :size => 25 %>
-<%= l(:text_length_between, 4, 12) %>

+<%= l(:text_caracters_minimum, 4) %>

<%= password_field_tag 'password_confirmation', nil, :size => 25 %>

diff --git a/lang/bg.yml b/lang/bg.yml index 50b54cb7c..5ec4577d8 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/cs.yml b/lang/cs.yml index d64e8d888..09394ef71 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/de.yml b/lang/de.yml index b25e8d930..ab3e47013 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/en.yml b/lang/en.yml index c1745b4e9..201ba1601 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -507,6 +507,7 @@ text_tip_task_end_day: task ending this day text_tip_task_begin_end_day: task beginning and ending this day text_project_identifier_info: 'Lower case letters (a-z), numbers and dashes allowed.
Once saved, the identifier can not be changed.' text_caracters_maximum: %d characters maximum. +text_caracters_minimum: Must be at least %d characters long. text_length_between: Length between %d and %d characters. text_tracker_no_workflow: No workflow defined for this tracker text_unallowed_characters: Unallowed characters diff --git a/lang/es.yml b/lang/es.yml index 824c84681..8ade705c8 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -548,3 +548,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/fr.yml b/lang/fr.yml index 322ddd261..e319db81c 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -507,6 +507,7 @@ text_tip_task_end_day: tâche finissant ce jour text_tip_task_begin_end_day: tâche commençant et finissant ce jour text_project_identifier_info: 'Lettres minuscules (a-z), chiffres et tirets autorisés.
Un fois sauvegardé, l''identifiant ne pourra plus être modifié.' text_caracters_maximum: %d caractères maximum. +text_caracters_minimum: %d caractères minimum. text_length_between: Longueur comprise entre %d et %d caractères. text_tracker_no_workflow: Aucun worflow n'est défini pour ce tracker text_unallowed_characters: Caractères non autorisés diff --git a/lang/he.yml b/lang/he.yml index f630fe051..7b20240ab 100644 --- a/lang/he.yml +++ b/lang/he.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/it.yml b/lang/it.yml index f103e18cc..ceb3102aa 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/ja.yml b/lang/ja.yml index 3a801fcf8..a1a0d968e 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -546,3 +546,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/ko.yml b/lang/ko.yml index 3886d7781..9dd8951fe 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/nl.yml b/lang/nl.yml index 1397f4c6e..16686d756 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -546,3 +546,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/pl.yml b/lang/pl.yml index 760250e69..cf5494895 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatyczna aktywacja kont label_registration_manual_activation: manualna aktywacja kont notice_account_pending: "Twoje konto zostało utworzone i oczekuje na zatwierdzenie administratora." field_time_zone: Strefa czasowa +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/pt-br.yml b/lang/pt-br.yml index 7444aad99..9e7bd9b4c 100644 --- a/lang/pt-br.yml +++ b/lang/pt-br.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/pt.yml b/lang/pt.yml index d75247aa9..78d739b87 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/ro.yml b/lang/ro.yml index 4cb2e4f8e..a81f61aec 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/ru.yml b/lang/ru.yml index ffc964f0c..30ab5dddc 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -545,3 +545,4 @@ label_registration_automatic_activation: автоматическая актив label_registration_manual_activation: активировать аккаунты вручную notice_account_pending: "Ваш аккаунт уже создан и ожидает подтверждения администратора." field_time_zone: Часовой пояс +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/sr.yml b/lang/sr.yml index 27be7da86..d08d0172a 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -546,3 +546,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/sv.yml b/lang/sv.yml index f5bd5a139..1b00eee1f 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -546,3 +546,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long. diff --git a/lang/zh.yml b/lang/zh.yml index 257286778..b20dd1b75 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -548,3 +548,4 @@ label_registration_automatic_activation: automatic account activation label_registration_manual_activation: manual account activation notice_account_pending: "Your account was created and is now pending administrator approval." field_time_zone: Time zone +text_caracters_minimum: Must be at least %d characters long.