fix formatting

This commit is contained in:
David Kilias 2021-04-20 22:39:12 +02:00
parent 619fd089e3
commit 19f125f542

View file

@ -3,8 +3,9 @@
from cerberus import Validator from cerberus import Validator
from validation_functions import * from validation_functions import *
def validate(entity): def validate(entity):
schema_fin={ schema_fin = {
'bic': { 'bic': {
'type': 'string', 'type': 'string',
'required': True, 'required': True,
@ -21,10 +22,10 @@ def validate(entity):
'scan-sepa-mandate': {'type': 'string'}, 'scan-sepa-mandate': {'type': 'string'},
'holder': {'type': 'string'}} 'holder': {'type': 'string'}}
schema_membership={ schema_membership = {
'bis': { 'bis': {
'type': 'string', 'type': 'string',
'oneof': [{'check_with': iso_date},{'empty': True}]}, 'oneof': [{'check_with': iso_date}, {'empty': True}]},
'mitgliedsbeitrag': { 'mitgliedsbeitrag': {
'type': 'string', 'type': 'string',
'check_with': valid_money_amount}, 'check_with': valid_money_amount},
@ -44,7 +45,7 @@ def validate(entity):
'required': True, 'required': True,
'check_with': iso_date}} 'check_with': iso_date}}
schema_base={ schema_base = {
'address_code': { 'address_code': {
'type': 'string'}, 'type': 'string'},
'address_country': { 'address_country': {