How to check if a user input text is all white space characters (space, tab, enter etc) in client side?
Like this...
function isEmpty(str) { return str.replace(/^\s+|\s+$/g, '').length == 0; }