code: def validate(self, data):
          
          validated = self._validated(data)
          errors = []
          for validator in self.additional_validators:
              if not validator(validated):
                  errors.append(
                      "%s invalidated by '%s'" % (
                          validated, _get_repr(validator)))
          if errors:
              raise NotValid(*errors)
  
          if self.default is UNSPECIFIED:
              return validated
  
          if self.null_values is not UNSPECIFIED\
                  and validated in self.null_values:
              return self.default
  
          if validated is None:
              return self.default
  
          return validated
docs: Validate data. Raise NotValid error for invalid data.