Skip to content

Instantly share code, notes, and snippets.

@kbparagua
Created November 22, 2015 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbparagua/96c1c6becf707853f39c to your computer and use it in GitHub Desktop.
Save kbparagua/96c1c6becf707853f39c to your computer and use it in GitHub Desktop.
VALID_EMAIL_REGEX = /\A([\w+\-].?)+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
def valid_email? email
email =~ VALID_EMAIL_REGEX
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment