The validation would take place on the confirm7_cart.php page. I imagine that is where the problem is, but you didn't attach that page for me to look at.
What exactly isn't working? Is it allowing any captcha value to pass? or never accepting the captcha?