diff --git a/app/models/account_request.rb b/app/models/account_request.rb index 6845565671..a704cddcdb 100644 --- a/app/models/account_request.rb +++ b/app/models/account_request.rb @@ -21,6 +21,7 @@ class AccountRequest < ApplicationRecord validates :email, presence: true, uniqueness: true validates :request_details, presence: true, length: { minimum: 50 } validates :email, format: { with: URI::MailTo::EMAIL_REGEXP } + validates :organization_website, format: { with: URI::DEFAULT_PARSER.make_regexp, message: "should look like 'https://www.example.com'" }, allow_blank: true validate :email_not_already_used_by_organization validate :email_not_already_used_by_user diff --git a/app/views/account_requests/new.html.erb b/app/views/account_requests/new.html.erb index 2125b21a3e..63292f501a 100644 --- a/app/views/account_requests/new.html.erb +++ b/app/views/account_requests/new.html.erb @@ -75,7 +75,7 @@