Unit tests
Refactor validator to consider Empty string valid instead of Blank

The purpose is to have tet field marked as valid when the string is
empty but it doesn't make much sense to consider valid if the user types
blanks.