fix js validation of email

also parallel the fix with phone, though no phone validation is done
anyways