def validate(self, val):
self.validate_type_only(val)<EOL>self.validate_fields_only(val)<EOL>return val<EOL>
For a val to pass validation, val must be of the correct type and have
all required fields present.