validation functionality implemented on form to check captchas