Fix app name, website and redirect URIs not having a maximum length (#16042)

Fix app scopes not being validated
This commit is contained in:
Eugen Rochko 2021-04-15 16:28:43 +02:00 committed by Claire
parent 24dee67d32
commit a319fd3cc4
3 changed files with 77 additions and 10 deletions

View file

@ -4,6 +4,8 @@ module ApplicationExtension
extend ActiveSupport::Concern
included do
validates :website, url: true, if: :website?
validates :name, length: { maximum: 60 }
validates :website, url: true, length: { maximum: 2_000 }, if: :website?
validates :redirect_uri, length: { maximum: 2_000 }
end
end