fixed validation for fields