7 lines
198 B
Ruby
7 lines
198 B
Ruby
class Entreprise < ActiveRecord::Base
|
|
|
|
validates_presence_of :email
|
|
validates_uniqueness_of :email
|
|
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
|
end
|