If a custom validation error is occurring when generating an invoice,which could be due to a custom validation you've implemented in your software.
Step 1:You can check and Go to Administration,click Utilities,Click customization,click Custom validation,Here,you will need to check whether any custom validation has been created for that voucher or not.
Step 2:If there is a custom validation displayed there, you will need to enter your vouchers according to that validation. Otherwise, if you do not want to use that validation, you will have to remove it.
Step 3:If you want to remove,click custom validation then click delete custom validation.