Is there a JavaScript equivalent to .NET\'s String.IsNullOrWhitespace so that I can check if a textbox on the client-side has any visible text in it?
I\'d rather do
You can use the regex /\S/ to test if a field is whitespace, and combine that with a null check.
/\S/
Ex:
if(textBoxVal === null || textBoxVal.match(/\S/)){ // field is invalid (empty or spaces) }