js issue while email validation