initial validation and same page form inputting