powmedia/backbone-forms — pull request #391 by richardaday (2014-06-25 06:40:12+00:00)
Title: Required validator should return an error for strings that only contain ...

We identified this issue when we started trimming values on the server side.

The old implementation for the "required" validator would allow strings with spaces to pass the validation. This meant the server was now trimming it down to an empty string causing the server side to respond with it's own error which could have been prevented.

My explanation in the previous paragraph is the reason why I decided to extend the functionality of the "required" validator as opposed to creating a "requiredNoWhitespace" custom validator. I feel that the majority of consumers will agree that strings containing whitespace should throw an error.