code: def validate(self, val):
          
  
          if self.nullable and val is None:
              return
          type_er = self.__type_check(val)
          if type_er:
              return type_er
  
          spec_err = self._specific_validation(val)
          if spec_err:
              return spec_err
docs: Performs basic validation of field value and then passes it for
          specific validation.
  
          :param val: field value to validate
          :return: error message or None