Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to use regex in jquery

jQuery(function () {
    $(".mail").keyup(function () {
        var VAL = this.value;

        var email = new RegExp('^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$');

        if (email.test(VAL)) {
            alert('Great, you entered an E-Mail-address');
        }
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: loopback get relationship in before save 
Javascript :: javascript letters as number 
Javascript :: nuxt small scroll 
Javascript :: nuxt redirect traffic from http to https 
Javascript :: node js check if a user exists in mysql 
Javascript :: kill node process 
Javascript :: Get child node index 
Javascript :: even number function in javascript 
Javascript :: .style.display 
Javascript :: convert object to json javascript 
Javascript :: if checkbox is checked jquery 
Javascript :: javascript alphabet to number 
Javascript :: javascript get timestamp 
Javascript :: redirect route after registration on mysql by axios post method 
Javascript :: generate random color jquery 
Javascript :: adonis attach 
Javascript :: react native flatlist from bottom to top 
Javascript :: change name of html element javascript 
Javascript :: remove after js 
Javascript :: javascript iterate object 
Javascript :: redirect the page in javascript 
Javascript :: jquery change value of input 
Javascript :: if variable does not exist javascript 
Javascript :: js trigger mouseover 
Javascript :: inner content 
Javascript :: html canvas draw base64 image 
Javascript :: show hide boxes using radio button selection jquery 
Javascript :: import jsx file without extension 
Javascript :: mouseover javascript 
Javascript :: how to change css with js 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =