Added validateForm function to document ready