Skip to content

Instantly share code, notes, and snippets.

@frankolson frankolson/some_model.rb
Last active Oct 31, 2019

Embed
What would you like to do?
Email validation in rails
class SomeModel < ApplicationRecord
validates :email, format: {
with: URI::MailTo::EMAIL_REGEXP,
message: 'requires a valid email format'
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.