added validForm to after so that there is a true false variable for easy checking.