Created
August 6, 2020 21:33
-
-
Save engmagdy87/277892fd146f1e183648bbfa5c5c3326 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const validateEmailAndPhoneNumber = function (value) { | |
| const emailRegEx = /^([a-zA-Z0-9])(([a-zA-Z0-9])*([\._\+-])*([a-zA-Z0-9]))*@(([a-zA-Z0-9\-])+(\.))+([a-zA-Z]{2,4})+$/; | |
| const mobileRegEx = /^\d{11}$/; | |
| return emailRegEx.test(value) || mobileRegEx.test(value); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment