I\'m making a form with inputs, if the input type is empty then the button submit is disabled but, if the input fields is with length > 0 the submit button is enabled
Try this
$.trim($("#spa").val()).length > 0
It will not treat any white space if any as a correct value