Added some validation to posted form