added correct behaviour for when required=false && value="" $valid should equal true

added funtionality + corresponding unit-test