Browse Source

Friendlier email validation

Andrew Kane 7 years ago
parent
commit
a609ac60e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/blazer/check.rb

+ 1 - 1
app/models/blazer/check.rb

@@ -75,7 +75,7 @@ module Blazer
         # but we know what they mean, so let's fix it
         # but we know what they mean, so let's fix it
         # also, some people like to use whitespace
         # also, some people like to use whitespace
         if emails.present?
         if emails.present?
-          self.emails = emails.gsub(/[;\s]/, ",").gsub(/,+/, ", ")
+          self.emails = emails.strip.gsub(/[;\s]/, ",").gsub(/,+/, ", ")
         end
         end
       end
       end