def validate_native(cls, value): if isinstance(value, datetime.datetime) and value.tzinfo is None: value = value.replace(tzinfo=spyne.LOCAL_TZ) return SimpleModel.validate_native(cls, value) and ( value is None or (value > cls.Attributes.gt and value >= cls.Attributes.ge and value < cls.Attributes.lt and value <= cls.Attributes.le))
def validate_native(cls, value): return SimpleModel.validate_native(cls, value) and ( value is None or ( value > cls.Attributes.gt and value >= cls.Attributes.ge and value < cls.Attributes.lt and value <= cls.Attributes.le ))
def validate_native(cls, value): if isinstance(value, datetime.datetime) and value.tzinfo is None: value = value.replace(tzinfo=spyne.LOCAL_TZ) return SimpleModel.validate_native(cls, value) and ( value is None or ( value > cls.Attributes.gt and value >= cls.Attributes.ge and value < cls.Attributes.lt and value <= cls.Attributes.le ))
def validate_native(cls, value): if isinstance(value, datetime.datetime) and value.tzinfo is None: value = value.replace(tzinfo=spyne.LOCAL_TZ) return SimpleModel.validate_native(cls, value) and (value is None or ( # min_dt is also a valid value if gt is intact. (cls.Attributes.gt is None or value > cls.Attributes.gt) and value >= cls.Attributes.ge # max_dt is also a valid value if lt is intact. and (cls.Attributes.lt is None or value < cls.Attributes.lt) and value <= cls.Attributes.le))
def validate_native(cls, value): if value is not None and isinstance(value, datetime.datetime): value = value.replace(tzinfo=pytz.utc) return SimpleModel.validate_native(cls, value) and ( value is None or ( value > cls.Attributes.gt and value >= cls.Attributes.ge and value < cls.Attributes.lt and value <= cls.Attributes.le ))
def validate_native(cls, value): if isinstance(value, datetime.datetime) and value.tzinfo is None: value = value.replace(tzinfo=spyne.LOCAL_TZ) return SimpleModel.validate_native(cls, value) and ( value is None or ( # min_dt is also a valid value if gt is intact. (cls.Attributes.gt is None or value > cls.Attributes.gt) and value >= cls.Attributes.ge # max_dt is also a valid value if lt is intact. and (cls.Attributes.lt is None or value < cls.Attributes.lt) and value <= cls.Attributes.le ))
def validate_native(cls, value): return SimpleModel.validate_native(cls, value)
def validate_native(cls, value): return (SimpleModel.validate_native(cls, value) and (value is None or ( _re_match_with_span(cls.Attributes, value) )))
def validate_native(cls, value): return (SimpleModel.validate_native(cls, value) and (value is None or (_re_match_with_span(cls.Attributes, value))))