Added support for non-mandatory fields

A field is only validated if the value is non-empty.

Fixes issue #13.