Skip to content

Commit 2e3fad4

Browse files
committed
fix: solve regex sem
1 parent b5c6510 commit 2e3fad4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/models/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class User < ApplicationRecord
3030
validates :password,
3131
length: { minimum: 8, message: 'must be at least 8 characters' },
3232
format: {
33-
with: /\A(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/,
33+
with: /\A(?=.*[a-z])(?=.*[A-Z])(?=.*\d).*\z/,
3434
message: 'must contain at least one uppercase letter, one lowercase letter, and one number'
3535
},
3636
if: -> { password.present? }

0 commit comments

Comments
 (0)