I tried using following method to ban users from leaving only space in the input area with no luck:
method one:
var formSub = $('#formsub').val();
if (formSub == null || formSub == "") {
return false;
}
method two:
if (formSub.trim() == "" || formSub.trim() == " ") {
return false;
}
method three:
if ($.trim(formSub) == "" || $.trim(formSub) == " ") {
return false;
}
Any thought? :)