adds email validation
adds directive for later use