Added address check for donors that want a receipt

ref #65
This commit is contained in:
2021-01-02 18:28:22 +01:00
parent becc277123
commit 335d4e24da
2 changed files with 17 additions and 1 deletions

View File

@@ -22,4 +22,15 @@ export class DonorIdsNotMatchingError extends NotAcceptableError {
@IsString()
message = "The ids don't match! \n And if you wanted to change a donor's id: This isn't allowed!"
}
/**
* Error to throw when a donor needs a receipt, but no address is associated with them.
*/
export class DonorReceiptAddressNeededError extends NotAcceptableError {
@IsString()
name = "DonorReceiptAddressNeededError"
@IsString()
message = "An address is needed to create a receipt for a donor. \n You didn't provide one."
}