mirror of
https://github.com/docusealco/docuseal
synced 2026-11-11 07:42:32 -05:00
dry run email validation
This commit is contained in:
1 parent
ab810be250
commit
910490528d
1 file changed
+5
-1
@@ -72,7 +72,11 @@ module Params
|
|||||||
return if params[key].blank?
|
return if params[key].blank?
|
||||||
return if params[key].to_s.strip.split(/\s*[;,]\s*/).all? { |email| email.match?(EMAIL_REGEXP) }
|
return if params[key].to_s.strip.split(/\s*[;,]\s*/).all? { |email| email.match?(EMAIL_REGEXP) }
|
||||||
|
|
||||||
raise_error(message || "#{key} must follow the email format")
|
if Rails.env.production?
|
||||||
|
Rollbar.error(message || "#{key} must follow the email format") if defined?(Rollbar)
|
||||||
|
else
|
||||||
|
raise_error(message || "#{key} must follow the email format")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def unique_value(params, key, message: nil)
|
def unique_value(params, key, message: nil)
|
||||||
|
|||||||
Reference in new issue
Block a user