Download NetflixClone/src/utils/validation.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 251 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/NetflixClone/src/utils/validation.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/NetflixClone/src/utils/validation.js
-
curl -L -o validation.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/NetflixClone/src/utils/validation.js
251 Bytes
| export const validEmailAndPhoneNumber = input => { | |
| const phoneRegex = /^\d{10}$/ // eslint-disable-next-line | |
| const emailRegex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/ | |
| return input.match(phoneRegex) || input.match(emailRegex) | |
| } |