Discount code fields

I have made a custom validation, but I can only use one discount code and if it is left blank its doesn’t let the user submit the form without entering the correct promo code