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:-
- myname@companyZ.com
- myname@companyY.com
- myname@companyX.com
Any idea how to do it in JQuery?
Update
This is what I wrote, uptill now
($input)
if (
(preg_match("/^S+@companyX.com$/i", $input) ||
(preg_match("/^S+@companyY.com$/i", $input) ||
(preg_match("/^S+@companyZ.com$/i", $input)
) {
}
else {
//Error.
}
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…