Revert "Don't allow spaces in external billing id"

This reverts commit 39825a9ecb.
This commit is contained in:
François Turbelin
2025-01-19 20:37:42 +01:00
parent 39822e1761
commit f8336edb07
2 changed files with 0 additions and 10 deletions

View File

@@ -127,9 +127,6 @@ class Enterprise < ApplicationRecord
message: Spree.t('errors.messages.invalid_instagram_url')
}, allow_blank: true
validate :validate_white_label_logo_link
validates :external_billing_id,
format: { with:/\A\S+\Z/ },
allow_blank: true
before_validation :initialize_permalink, if: lambda { permalink.nil? }
before_validation :set_unused_address_fields

View File

@@ -415,13 +415,6 @@ RSpec.describe Enterprise do
expect(e).not_to be_valid
end
end
describe "external_billing_id" do
it "does not validate the external_billing_id attribute with a space" do
e = build(:enterprise, external_billing_id: 'with spaces')
expect(e).not_to be_valid
end
end
end
describe "serialisation" do