From 36d5ea7c5f531baadf2467d1723e66309bb18c02 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Fri, 13 Nov 2020 09:24:53 +0100 Subject: [PATCH] optional als separater parameter statt als eigenen validator --- validation_schema.json | 178 ++++++++++++++++++++++++++++++++++------- 1 file changed, 149 insertions(+), 29 deletions(-) diff --git a/validation_schema.json b/validation_schema.json index 0e65106..2a1f6a4 100644 --- a/validation_schema.json +++ b/validation_schema.json @@ -1,30 +1,150 @@ { - "finanzdaten.bic": {"validators": ["mandatory", "valid_bic"]}, - "finanzdaten.holder": {"validators": ["optional"]}, - "finanzdaten.iban": {"validators": ["mandatory", "valid_iban"]}, - "finanzdaten.issuance": {"validators": ["mandatory", "iso_date"]}, - "finanzdaten.reference": {"validators": ["empty"]}, - "finanzdaten.scan-sepa-mandate": {"validators": ["optional", "valid_uri"]}, - "mitgliederdaten.bis": {"validators": ["iso_date"]}, - "mitgliederdaten.mitgliedsbeitrag": {"validators": ["mandatory", "valid_money_amount"]}, - "mitgliederdaten.scan-antrag": {"validators": ["optional", "valid_uri"]}, - "mitgliederdaten.schliessberechtigung": {"validators": ["optional", "valid_door_auth"]}, - "mitgliederdaten.spendenbeitrag": {"validators": ["valid_money_amount"]}, - "mitgliederdaten.status": {"validators": ["mandatory", "valid_status"]}, - "mitgliederdaten.von": {"validators": ["mandatory", "iso_date"]}, - "stammdaten.address_code": {"validators": ["mandatory"]}, - "stammdaten.address_country": {"validators": ["mandatory"]}, - "stammdaten.address_label": {"validators": ["mandatory"]}, - "stammdaten.address_locality": {"validators": ["mandatory"]}, - "stammdaten.address_region": {"validators": []}, - "stammdaten.address_street": {"validators": ["mandatory"]}, - "stammdaten.birth_date": {"validators": ["mandatory", "iso_date"]}, - "stammdaten.birth_location": {"validators": ["mandatory"]}, - "stammdaten.email": {"validators": ["mandatory", "valid_email"]}, - "stammdaten.fullname": {"validators": ["mandatory"]}, - "stammdaten.nickname": {"validators": ["optional"]}, - "stammdaten.pgp-key": {"validators": ["optional", "valid_uri"]}, - "stammdaten.ssh-key": {"validators": ["optional", "valid_uri"]}, - "timestamp": {"validators": ["mandatory", "iso_timestamp"]}, - "id": {"validators": ["mandatory", "valid_id"]} - } \ No newline at end of file + "finanzdaten.bic": { + "optional": false, + "validators": [ + "valid_bic" + ] + }, + "finanzdaten.holder": { + "optional": true, + "validators": [] + }, + "finanzdaten.iban": { + "optional": false, + "validators": [ + "valid_iban" + ] + }, + "finanzdaten.issuance": { + "optional": false, + "validators": [ + "iso_date" + ] + }, + "finanzdaten.reference": { + "optional": true, + "validators": [ + "empty" + ] + }, + "finanzdaten.scan-sepa-mandate": { + "optional": true, + "validators": [ + "valid_uri" + ] + }, + "mitgliederdaten.bis": { + "optional": true, + "validators": [ + "iso_date" + ] + }, + "mitgliederdaten.mitgliedsbeitrag": { + "optional": false, + "validators": [ + "valid_money_amount" + ] + }, + "mitgliederdaten.scan-antrag": { + "optional": true, + "validators": [ + "valid_uri" + ] + }, + "mitgliederdaten.schliessberechtigung": { + "optional": true, + "validators": [ + "valid_door_auth" + ] + }, + "mitgliederdaten.spendenbeitrag": { + "optional": true, + "validators": [ + "valid_money_amount" + ] + }, + "mitgliederdaten.status": { + "optional": false, + "validators": [ + "valid_status" + ] + }, + "mitgliederdaten.von": { + "optional": false, + "validators": [ + "iso_date" + ] + }, + "stammdaten.address_code": { + "optional": false, + "validators": [] + }, + "stammdaten.address_country": { + "optional": false, + "validators": [] + }, + "stammdaten.address_label": { + "optional": false, + "validators": [] + }, + "stammdaten.address_locality": { + "optional": false, + "validators": [] + }, + "stammdaten.address_region": { + "optional": true, + "validators": [] + }, + "stammdaten.address_street": { + "optional": false, + "validators": [] + }, + "stammdaten.birth_date": { + "optional": false, + "validators": [ + "iso_date" + ] + }, + "stammdaten.birth_location": { + "optional": false, + "validators": [] + }, + "stammdaten.email": { + "optional": false, + "validators": [ + "valid_email" + ] + }, + "stammdaten.fullname": { + "optional": false, + "validators": [] + }, + "stammdaten.nickname": { + "optional": true, + "validators": [] + }, + "stammdaten.pgp-key": { + "optional": true, + "validators": [ + "valid_uri" + ] + }, + "stammdaten.ssh-key": { + "optional": true, + "validators": [ + "valid_uri" + ] + }, + "timestamp": { + "optional": false, + "validators": [ + "iso_timestamp" + ] + }, + "id": { + "optional": false, + "validators": [ + "valid_id" + ] + } +} \ No newline at end of file