Beispiel #1
0
 def validate_diploma_year(self, diploma_year):
     Validator.required(diploma_year)
     Validator.length(diploma_year, 4, 4)
     Validator.numerical(diploma_year)
     if not (2020 >= int(str(diploma_year.data).strip()) >= 1969):
         raise ValidationError(
             'Humm... Vous êtes trop jeune ou trop agé pour travailler, non?'
         )
Beispiel #2
0
 def validate_zip_code(self, zip_code):
     Validator.required(zip_code)
     Validator.length(zip_code, 5, 5)
     Validator.numerical(zip_code)
Beispiel #3
0
 def validate_birth_zip_code(self, birth_zip_code):
     Validator.required(birth_zip_code)
     Validator.length(birth_zip_code, 5, 5)
     Validator.numerical(birth_zip_code)