fix email regex in Supplier (\A,\z vs ^,$)
This commit is contained in:
parent
cbcf042992
commit
c135679992
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ class Supplier < ActiveRecord::Base
|
|||
serialize :lists
|
||||
|
||||
FTP_TYPES = ['bnn', 'foodsoft'].freeze
|
||||
EMAIL_RE = /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i.freeze
|
||||
EMAIL_RE = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i.freeze
|
||||
|
||||
validates :name, :address, :phone, presence: true
|
||||
validates :ftp_host, :ftp_user, :ftp_password, :ftp_sync, presence: true, if: :ftp_sync?
|
||||
|
|
Loading…
Reference in a new issue