form validation, added tests for main get/post