more constraints on fields

This commit is contained in:
David Kilias 2020-12-04 21:03:09 +01:00
parent e3557f5d52
commit 5154646ca2

View file

@ -76,6 +76,7 @@ schema_membership={
'check_with': valid_money_amount},
'status': {
'type': 'string',
'required': True,
'allowed': ['V', 'E', 'F']},
'von': {
'type': 'string',
@ -103,9 +104,11 @@ schema_base={
'type': 'string'},
'email': {
'type': 'string',
'required': True,
'regex': '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'},
'fullname': {
'type': 'string'},
'type': 'string',
'required': True},
'nickname': {
'type': 'string'},
'pgp-key': {
@ -125,9 +128,11 @@ schema = {
'schema': schema_base},
'id': {
'type': 'string',
'required': True,
'regex': '^[a-f0-9]{5}$'},
'timestamp': {
'type': 'string'}
'type': 'string',
'required': True}
}
v = Validator()