Make ValidateForm function static