script to validate the submission