Skip to content

Commit 9b594f0

Browse files
committed
Add validation for the old_password_digest column
We cannot do it in the same commit than the column creation because we're going to hit validation errors for a column that does not exist from the db:seed
1 parent 621427a commit 9b594f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/app/models/user.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class User < ApplicationRecord
103103
too_long: 'must have less than 100 characters',
104104
too_short: 'must have more than two characters' }
105105

106+
validates :old_password_digest, length: { maximum: 255 }
106107
validates :state, inclusion: { in: STATES }
107108

108109
validate :validate_state

0 commit comments

Comments
 (0)