added form validation to reg page.