From 8f92915818c0ec1993445294e474e8b88bac7024 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 18 Feb 2022 11:20:09 +0100 Subject: [PATCH] Allow minimal password length of 5 characters --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 09441bb6..82d80ed5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -33,7 +33,7 @@ class User < ApplicationRecord validates_presence_of :first_name # for simple_form validations validates_length_of :first_name, :in => 2..50 validates_confirmation_of :password - validates_length_of :password, :in => 12..50, :allow_blank => true + validates_length_of :password, :in => 5..50, :allow_blank => true # allow nick to be nil depending on foodcoop config # TODO Rails 4 may have a more beautiful way # http://stackoverflow.com/questions/19845910/conditional-allow-nil-part-of-validation