code: def validate(self, value):
          
          errors = []
  
          # Make sure the type validates first.
          valid = self._is_valid(value)
          if not valid:
              errors.append(self.fail(value))
              return errors
  
          # Then validate all the constraints second.
          for constraint in self._constraints_inst:
              error = constraint.is_valid(value)
              if error:
                  errors.append(error)
  
          return errors
docs: Check if ``value`` is valid.
  
          :returns: [errors] If ``value`` is invalid, otherwise [].