email validation in rails
Last update
2023-11-24
2023-11-24
« — »
1 2 3 4 | validates :email, presence: true, uniqueness: { case_sensitive: false }, format: { with: URI::MailTo::EMAIL_REGEXP } |
Simply use /\A.+@.+\..+\z/i
and put and end to the overkill.
Source: passwordless gem, railsguides, Stop Validating Email Addresses with Regex