Beispiel #1
0
 def validate_foo(self, value):
     if len(value) != 3:
         raise ValidationError()
Beispiel #2
0
 def validate_a(self, value):
     if value <= 0:
         raise ValidationError()
     return value
Beispiel #3
0
        def validate_d(self, d):
            if len(d) < 2:
                raise ValidationError()

            d += '.'
            return d
Beispiel #4
0
 def validate_c(self, c):
     if c < 0:
         raise ValidationError()
     return c
Beispiel #5
0
 def validate_foo(self, foo):
     foo = foo.strip()
     if len(foo) != 3:
         raise ValidationError()
     return foo
Beispiel #6
0
 def validate_foo(self, value):
     if value != 'foo':
         raise ValidationError()