Skip to content

Instantly share code, notes, and snippets.

@mmrwoods
Created December 23, 2013 16:22
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 mmrwoods/8099945 to your computer and use it in GitHub Desktop.
Save mmrwoods/8099945 to your computer and use it in GitHub Desktop.
# Rails email validator is required by the secure validatable module in devise security extension
# However, it handles internation domain names and does mx lookups by default, and there's no easy way to change this default.
class EmailValidator
def validate_mx?
options[:validate_mx] == true
end
def allow_idn?
options[:allow_idn] == true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment