How to check if a user input text is all white space characters (space, tab, enter etc) in client side?
This will also work:
var text = " "; text.trim().length == 0; //true