I am trying to make registration form within which I want to register only with specific domains' emails. For e.g. I want to register only the emails which are from the companyX, companyY, companyZ.
Hence the acceptable emails would be:-
Any idea how to do it in JQuery?
Update
This is what I wrote, uptill now
($input)
if (
(preg_match("/^[email protected]$/i", $input) ||
(preg_match("/^[email protected]$/i", $input) ||
(preg_match("/^[email protected]$/i", $input)
) {
}
else {
//Error.
}
Thanks
See Question&Answers more detail:os