Skip to content

Commit 8056a82

Browse files
committed
Improve wording for output printed when an error occurs during validation.
1 parent 5f31ae1 commit 8056a82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PyFePA/serializer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def validate(invoice_part):
5757
elif v['value'] is not None and v['conflict'] is not None:
5858
for d in v['conflict']:
5959
if taglist[d]['value'] is not None:
60-
raise ValidateException('{0} Conflict with {1}'.format(v['tag'],v['conflict']))
60+
raise ValidateException('Cannot specify both {0} and {1} at the same time'.format(v['tag'],v['conflict']))
6161
elif v['value'] is None and v['conflict'] is not None and v['required']:
6262
for d in v['conflict']:
6363
if taglist[d]['value'] is None:
64-
raise ValidateException('{0} or {1} must be specified'.format(v['tag'],v['conflict']))
64+
raise ValidateException('Must specify either {0} or {1} but not both at the same time'.format(v['tag'],v['conflict']))
6565

6666
return taglist
6767

0 commit comments

Comments
 (0)