code: def validate(self, name, value):
          
          validator = self.attribute_validators.get(name, None)
          if validator:
              return True if validator(value) else False
          return True
docs: Validate a cookie attribute with an appropriate validator.
  
          The value comes in already parsed (for example, an expires value
          should be a datetime). Called automatically when an attribute
          value is set.