Client side validation for whitespace