Created
November 6, 2018 09:54
-
-
Save AhmedHelalAhmed/150ec8ec03c47165e5ef1eab04b934f2 to your computer and use it in GitHub Desktop.
validate input is text not space in js
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
| if (!input.replace(/\s/g, '').length) | |
| { | |
| // code | |
| } | |
| if (!input) | |
| { | |
| // code | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment