Add validation for whitespace characters.
Merge pull request #1180 from rkachowski/bugfix/1109

Add validation for whitespace characters.