Check Email Validation using JavaScript in php

function validateEmail(email) { var emailReg = /^([\w-\.][email protected]([\w-]+\.)+[\w-]{2,4})?$/; return emailReg.test(email); }