コード例 #1
0
ファイル: primitive.py プロジェクト: anthonyrisinger/spyne
 def validate_string(cls, value):
     return (     SimpleModel.validate_string(cls, value)
         and (value is None or (
                 len(value) >= cls.Attributes.min_len
             and len(value) <= cls.Attributes.max_len
             and _re_match_with_span(cls.Attributes, value)
         )))
コード例 #2
0
ファイル: primitive.py プロジェクト: mangroovie/spyne
 def validate_string(cls, value):
     return SimpleModel.validate_string(cls, value) and (
         value is None or
         (len(value) <=
          (cls.Attributes.total_digits + cls.Attributes.fraction_digits + 1)
          # + 1 is for decimal separator
          ))
コード例 #3
0
ファイル: primitive.py プロジェクト: tlandschoff-scale/spyne
 def validate_string(cls, value):
     return SimpleModel.validate_string(cls, value) and (
         value is None or (
             len(value) <= (cls.Attributes.total_digits +
                                          cls.Attributes.fraction_digits + 1)
                                               # + 1 is for decimal separator
         ))
コード例 #4
0
 def validate_string(cls, value):
     return (     SimpleModel.validate_string(cls, value)
         and (value is None or (
                 len(value) >= cls.Attributes.min_len
             and len(value) <= cls.Attributes.max_len
             and _re_match_with_span(cls.Attributes, value)
         )))
コード例 #5
0
ファイル: primitive.py プロジェクト: Juspeczyk/spyne
 def validate_string(cls, value):
     return (     SimpleModel.validate_string(cls, value)
         and (value is None or (
                 len(value) >= cls.Attributes.min_len
             and len(value) <= cls.Attributes.max_len
             and (cls.Attributes.pattern is None or
                         re.match(cls.Attributes.pattern, value) is not None)
             )))
コード例 #6
0
ファイル: primitive.py プロジェクト: jrocnuck/spyne
 def validate_string(cls, value):
     return SimpleModel.validate_string(cls, value) and (
         value is None or (len(value) <= cls.Attributes.max_str_len)
     )
コード例 #7
0
ファイル: enum.py プロジェクト: jpunwin/spyne
 def validate_string(cls, value):
     return SimpleModel.validate_string(cls, value) and value in cls.__values__
コード例 #8
0
ファイル: number.py プロジェクト: armandomeeuwenoord/spyne
 def validate_string(cls, value):
     return SimpleModel.validate_string(
         cls, value) and (value is None or
                          (len(value) <= cls.Attributes.max_str_len))
コード例 #9
0
ファイル: enum.py プロジェクト: tunks/spyne
 def validate_string(cls, value):
     return (    SimpleModel.validate_string(cls, value)
             and value in cls.__values__
         )