Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Write validations in the model User
class User < ActiveRecord::Base
has_secure_password
validates :name, presence: true
validates :email, presence: true, uniqueness: { case_sensitive: false }, email: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment