JQuery Validate (1)---phone number and mailbox verification

Source: Internet
Author: User
Tags data structures
1, HTML file
<div class= "Form-group" >
    <label class= "col-sm-2 Control-label" > Contact mobile phone </label>
    <div class= "Col-sm-4" >
        <input v-bind:disabled= "forminfo.state = 1" type= "text" id= "mobile" name= " Organizationaddparams.mobile "class=" Form-control "v-model=" adddata[' Organizationaddparams.mobile '] "mobile=" true "Required=" True >
    </div>
    <label class= "col-sm-2 control-label" > user mailbox </label>
    <div class= "col-sm-4" >
        <input v-bind:disabled= "forminfo.state = 1" type= "text" id= "email" name= " Organizationaddparams.email "class=" Form-control "v-model=" adddata[' Organizationaddparams.email ' "" Email= "true" Required= "true" rangelength= "[1,100]" >
    </div>
</div>
2. Script
$.validator.addmethod ("mobile", function (value, Element) {
    if (/^) ([0\+]\d{2,3}-)? 0\d{2,3})? (\d{7,8}) (-(\d{3,}))? $/.test (value) | | /^1[34578][0-9]\d{8}$/.test (value)) {return
        true;
    }
    return false;
"Please enter a fixed or mobile phone number");   

————————————————————————————————————————————————— – Java Architect Project Combat, high concurrency cluster distributed, large data high availability video tutorials, total 760G

Download Address:

https://item.taobao.com/item.htm?id=562739965822

01. High-level architect 42 Phases
02.Java Advanced System Training Architecture Course 148 hours
03.Java Senior Internet Architect Course
04.Java Internet Architecture Netty, Nio, Mina, etc.-Video tutorials
05.Java Advanced Architecture Design 2016 finishing-video tutorials
06. Architect Foundation, advanced film
07.Java Architect Required Linux Operation series courses
08.Java Advanced System Training Architecture Course 116 hours
+
Hadoop series tutorials, Java design patterns and data structures, Spring Cloud Micro service, Springboot Primer
*——————————-

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.