Update email.c

helper function bool isValidInput(char *str) added