jQuery Regular Expression Real Time Form Validation Example – Technology

jQuery Regular Expression Real Time Form Validation Example – Technology

In this post we will give you information about jQuery Regular Expression Real Time Form Validation Example – Technology. Hear we will give you detail about jQuery Regular Expression Real Time Form Validation Example – TechnologyAnd how to use it also give you demo for it if it is necessary.

Today, We want to share with you jQuery Regular Expression Real Time Form Validation Example.In this post we will show you Jquery Validation with Regular Expressions, hear for password validation in jquery using regular expression we will give you demo and example for implement.In this post, we will learn about Real Time Form Validation using Regular Expressions in jQuery with an example.

jQuery Regular Expression Real Time Form Validation Example

There are the Following The simple About jQuery Regular Expression Real Time Form Validation Example Full Information With Example and source code.

As I will cover this Post with live Working example to develop jquery regular expression validation for special characters, so the some major files and Directory structures for this example is following below.

  • Email
  • URL
  • Username
  • Password
  • Strong Password

Email validation in jquery using regular expression

Email Checking using Regular Expression

Regular Expression with jQuery Validation

function checkLiveEmail(email)
{
    //jQuery Regular Expression Real Time Form Validation Example
    var liveStrongPtrn = new RegExp(/^(("[w-s]+")|([w-]+(?:.[w-]+)*)|("[w-s]+")([w-]+(?:.[w-]+)*))(@((?:[w-]+.)*w[w-]{0,66}).([a-z]{2,6}(?:.[a-z]{2})?)$)|(@[?((25[0-5].|2[0-4][0-9].|1[0-9]{2}.|[0-9]{1,2}.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2}).){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})]?$)/i);
    if(liveStrongPtrn.test(email)){
        return true;
    } else {
        return false;
    }
}

simple JavaScript regular expression for email validation

var liveStrongPtrn = /^[a-zA-Z0-9._-][email protected][a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$/;

Output – Results

admin.email.com = Error
[email protected] = Ok

URL validation in jquery using regular expression

URL Check using Regular Expression

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

http or https with URL

function checkUrl(url)
{
    //regular url expression for URL
    var liveStrongPtrn = /^(http|https)?://[a-zA-Z0-9-.]+.[a-z]{2,4}/;
 
    if(liveStrongPtrn.test(url)){
        return true;
    } else {
        return false;
    }
}

Output – Results

www.onlinecode = Error
http://onlinecode = Ok
 = Ok

Username validation in jquery using regular expression

Username Check using Regular Expression

accept 5-15 characters without any symbol or special characters

function checkLiveFirstname(username){
    var liveStrongPtrn = /^[a-z0-9_-]{5,15}$/;
    if(liveStrongPtrn.test(username)){
        return true;
    }else{
        return false;
    }
}

Output – Results

Result:
jaydeep.gondaliya = Error
jaydeep123 = Ok

password validation in jquery using regular expression

Password using Regular Expression

accept 6-18 lowercase, uppercase, characters, numbers

function checkPassword(password){
    var liveStrongPtrn = /^[a-zA-Z0-9_-]{6,18}$/;
    if(liveStrongPtrn.test(password)){
        return true;
    }else{
        return false;
    }
}

Output – Results

Result:
JdPaka = Ok
[email protected] = Error

Strong Password using Regular Expression

  • Must be at least 8 characters
  • At least 1 number, 1 lowercase, 1 uppercase letter
  • At least 1 special character from @#$%&

Another must read:  Simple Multiple Countdown timers using jquery

var liveStrongPtrn = /^.*(?=.{8,})(?=.*d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%&]).*$/;

Output – Results

Result:
[email protected] = Ok
[email protected] = Error

jQuery Regular Expression Real Time Form Validation Example – Outout

Regular-Expression-With-jQuery-Validation
Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about jQuery Regular Expression Real Time Form Validation Example.
I would like to have feedback on my onlinecode blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Hope this code and post will helped you for implement jQuery Regular Expression Real Time Form Validation Example – Technology. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

13  +    =  19

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US