mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
fix email validation
This commit is contained in:
1 parent
9032517d4e
commit
440d1114be
1 file changed
+4
-1
@@ -70,7 +70,10 @@ module Params
|
||||
def email_format(params, key, message: nil)
|
||||
return if params.blank?
|
||||
return if params[key].blank?
|
||||
return if params[key].to_s.strip.split(/\s*[;,]\s*/).all? { |email| email.match?(EMAIL_REGEXP) }
|
||||
|
||||
if params[key].to_s.strip.split(/\s*[;,]\s*/).all? { |email| EmailTypo::DotCom.call(email).match?(EMAIL_REGEXP) }
|
||||
return
|
||||
end
|
||||
|
||||
if Rails.env.production?
|
||||
Rollbar.error(message || "#{key} must follow the email format") if defined?(Rollbar)
|
||||
|
||||
Reference in new issue
Block a user