[Hotfix] Allow blank values for payment_pointer (#11786)
This commit is contained in:
parent
bd9e83de6c
commit
f6d73fea8d
2 changed files with 2 additions and 1 deletions
|
|
@ -213,7 +213,7 @@ class User < ApplicationRecord
|
|||
validates :inbox_type, inclusion: { in: INBOXES }
|
||||
validates :name, length: { in: 1..100 }
|
||||
validates :password, length: { in: 8..100 }, allow_nil: true
|
||||
validates :payment_pointer, format: PAYMENT_POINTER_REGEXP, allow_nil: true
|
||||
validates :payment_pointer, format: PAYMENT_POINTER_REGEXP, allow_blank: true
|
||||
validates :rating_votes_count, presence: true
|
||||
validates :reactions_count, presence: true
|
||||
validates :sign_in_count, presence: true
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ RSpec.describe User, type: :model do
|
|||
it { is_expected.not_to allow_value("example.com/value").for(:payment_pointer) }
|
||||
it { is_expected.to allow_value(" $example.com/value ").for(:payment_pointer) }
|
||||
it { is_expected.to allow_value(nil).for(:payment_pointer) }
|
||||
it { is_expected.to allow_value("").for(:payment_pointer) }
|
||||
|
||||
it { is_expected.to validate_inclusion_of(:inbox_type).in_array(%w[open private]) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue