title: Validation specific email specific domain devise 3 ruby on rails 4
body: <p>I previously posted a question about how to use validations to only allow visitor using an email address ending with @grenoble-em.com to be able to register on my website. I am using devise 3 and Rails 4. I am fairly new to it and would appreciate any answer. Here is my user model. </p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    # Include default devise modules. Others available are:
    # :confirmable, :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable
  
    has_attached_file :picture, :styles =&gt; { :medium =&gt; "300x300&gt;", :thumb =&gt; "100x100&gt;" }, :default_url =&gt; "/images/:style/missing.png"
    validates_attachment_content_type :picture, :content_type =&gt; /\Aimage\/.*\Z/
    validates :email, uniqueness: true
  end
  </code></pre>
  
  <p>Thank you all in advance. You guys do a great job helping people :) </p>