Skip to content

Commit

Permalink
refacto
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbaraOliveira13 committed Aug 30, 2024
1 parent 6847909 commit 3b940bf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Decidim
module FriendlySignup
class RegistrationFormOverride < Decidim::RegistrationForm
Expand All @@ -6,9 +8,7 @@ class RegistrationFormOverride < Decidim::RegistrationForm
private

def no_special_characters_in_email
if email =~ /[<>'"]/
errors.add(:email, "contains invalid characters")
end
errors.add(:email, "contains invalid characters") if email =~ /[<>'"]/
end
end
end
Expand Down

0 comments on commit 3b940bf

Please sign in to comment.