Created
April 9, 2021 12:41
-
-
Save freakflames29/d5333a8a8d225be0fc8736e22e9d48f8 to your computer and use it in GitHub Desktop.
Valid email regex
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-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6})$/i | |
validates :email , presence: true,uniqueness:{case_sensetive:false}, | |
format:{with:VALID_EMAIL_REGEX,multiline:true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment