extract email validation into method