Created
January 30, 2012 11:51
-
-
Save rodrigomaia/1704022 to your computer and use it in GitHub Desktop.
ReGex Validates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
valid_email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i | |
validates :email, presence: true, format: { with: valid_email_regex } | |
font: http://ruby.railstutorial.org/chapters/modeling-users?version=3.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment