瀏覽代碼

Friendlier email validation

Andrew Kane 7 年之前
父節點
當前提交
a609ac60e6
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
         # also, some people like to use whitespace
         if emails.present?
-          self.emails = emails.gsub(/[;\s]/, ",").gsub(/,+/, ", ")
+          self.emails = emails.strip.gsub(/[;\s]/, ",").gsub(/,+/, ", ")
         end
       end