The control accepts multiple blank spaces. I need help to validate this.
1. I tried using regex - "/^(\s+)$/" to check for multiple spaces directly on the 'message' variable.
2. Tried using WYSIWYG.removeFormat() - removes all HTML formatting, and multiple spaces are replaced with a single space) and then checked for occurence of a single space.
But, nothing seems to work. Regex does not work with WYSIWYG control, nor does checking for a space. Is there a way to get this working?
Also, the control's innerHTML's length for a single space is 7 characters(after truncating multiple spaces).