Allow `sharing_custom_url` to be empty
This commit is contained in:
parent
a564bd740b
commit
490a06af27
|
@ -61,7 +61,7 @@ class User < ApplicationRecord # rubocop:disable Metrics/ClassLength
|
||||||
end
|
end
|
||||||
|
|
||||||
validates :email, fake_email: true, typoed_email: true
|
validates :email, fake_email: true, typoed_email: true
|
||||||
validates :sharing_custom_url, format: URI::DEFAULT_PARSER.make_regexp(%w[http https])
|
validates :sharing_custom_url, format: URI::DEFAULT_PARSER.make_regexp(%w[http https]), allow_blank: true
|
||||||
validates :screen_name,
|
validates :screen_name,
|
||||||
presence: true,
|
presence: true,
|
||||||
format: { with: SCREEN_NAME_REGEX, message: I18n.t("activerecord.validation.user.screen_name.format") },
|
format: { with: SCREEN_NAME_REGEX, message: I18n.t("activerecord.validation.user.screen_name.format") },
|
||||||
|
|
Loading…
Reference in New Issue