added simple validation for nested fields