javascriptregexemailemail-validationemail-address

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??


Solution

  • (\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)