validate email address before submit