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
If you simply want to validate that the email contains that domain, and not much else, you can add this validator:
class User < ActiveRecord::Base
validates_format_of :email, with: /\@grenoble-em\.com/, message: 'You should have an email from grenoble-em.com'
end
You can read more about all the validators here: http://api.rubyonrails.org/classes/ActiveModel/Validations/HelperMethods.html