playframework/Play20 — pull request #910 by rschellhorn (2013-03-26 14:06:35+00:00)
Title: Make nonEmpty constraint also reject input containing whitespace only

It would be nice if nonEmptyText also rejects input containing whitespace only.

Currently there is little difference between the text and nonEmptyText form data constraints. Of course nonEmptyText also rejects strings of length 0, but this can be achieved with text(minLength = 1) as well.

Note that this changes the API! Alternatively we can introduce a nonBlankText validator + constraint.