Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Email validation with particular extensions?

enter image description here

form code:

<form class="form"  name ="custRegistration"  id="custRegistration"  onsubmit="return submitAlbum(this)" action="download.jsp" method="post" >


        <p class="email">
            <label for="budget">Expected Budget :</label>
            <input type="text" name="budget"  id="budget"/>
        </p>




        <p class="submit">
             <label for="download" id="freetrail">Download 30 day free trial</label>
            <input type="submit" value="Submit" />
        </p>

    </form>

i want to validate email-ids with the extension which are checked in the above image and block rest of the email-id extensions using javascript..any help would be appreciated??

like image 664
User2413 Avatar asked Nov 23 '22 21:11

User2413


1 Answers

(\w+\.)*\w+@(\w+\.)+[A-Za-z]+

this regex is email check basic.

you may use regex for this case, follow regex:

((\w+\.)*\w+)@(\w+\.)+(com|kr|net|us|info|biz)

like image 141
Ahn Jung-Min Avatar answered Dec 04 '22 13:12

Ahn Jung-Min