adds validation and tests for name and email, completes section 6.2.2