Skip to content

Instantly share code, notes, and snippets.

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

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'
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.