merge email validation function