Created
June 14, 2019 09:24
-
-
Save tanmay27vats/a290c93c03a555ddf8bde101fc504873 to your computer and use it in GitHub Desktop.
How to check if all inputs are not empty with jQuery
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
$("input:empty").length == 0; | |
/* Above statement will bypass the empty spaces. */ | |
/* If you want to search for all empty inputs including blank/empty spaces. Try below one */ | |
$("input").filter(function () { | |
return $.trim($(this).val()).length == 0 | |
}).length == 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment