Changed TextRule to support non-required fields

TextRule now supports non required fields. If the field is empty, the
minLengh is not required, otherwise the minLength rule should be
respected.

The default behavior has been preserved (required = true)