We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5c6510 commit 2e3fad4Copy full SHA for 2e3fad4
1 file changed
app/models/user.rb
@@ -30,7 +30,7 @@ class User < ApplicationRecord
30
validates :password,
31
length: { minimum: 8, message: 'must be at least 8 characters' },
32
format: {
33
- with: /\A(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,
+ with: /\A(?=.*[a-z])(?=.*[A-Z])(?=.*\d).*\z/,
34
message: 'must contain at least one uppercase letter, one lowercase letter, and one number'
35
},
36
if: -> { password.present? }
0 commit comments