jQuery Validation Email Mobile password Regular Expression

jQuery Validation Email Mobile password Regular Expression

In this Post We Will Explain About is jQuery Validation Email Mobile password Regular Expression With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Regular Expression With jQuery ValidationExample

In this post we will show you Best way to implement jquery regular expression validation for special characters, hear for jquery regular expression validation for email mobile and urlwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  VueJs Dynamic Class and Style Bindings

jQuery Validation – Regular Expression for Email:

//function used to check valid email
function custom_checkEmail(email)
{
    //simple regular expression for email address
    var custom_pattern = 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(custom_pattern.test(email)){
		//return sucess
        return true;
    } else {
        return false;
    }
}

We can use simple regular expression for email validation.

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

jQuery Validation – Regular Expression for URL:

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

jQuery Validation – Regular Expression for Username

function Valid_checkUsername(your_username){
    var custom_pattern = /^[a-z0-9_-]{4,15}$/;
    if(custom_pattern.test(your_username)){
	//return sucess
        return true;
    }else{
        return false;
    }
}

jQuery Validation – Regular Expression for Password

function Valid_checkPassword(your_password){
    var custom_pattern = /^[a-zA-Z0-9_-]{5,15}$/;
    if(custom_pattern.test(your_password)){
	//return sucess
        return true;
    }else{
        return false;
    }
}

jQuery Validation – Regular Expression for Strong Password

Must be at least must or more 8 characters please Enter
please Enter At least must 1 number, must 1 lowercase, must 1 uppercase letter
please Enter At least must 1 special character Like as a @#$%&

Read Also:  Full Stack Developer | Career Path, Salary, Jobs and Comparison with Software Engineer.

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

Example

I hope you have Got What is Real Time Form Validation using Regular Expressions in jQuery And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  JavaScript Capitalize first letter uppercase, lowercase and camel case
  2. Read Also:  ng-blur Event using Angular Example
  3. Read Also:  jQuery Regular Expression Real Time Form Validation Example
  4. Read Also:  Laravel AJAX Live Autocomplete Search from Database
  5. Read Also:  Create Dynamic XML Sitemaps Using PHP MYSQL
  6. Read Also:  Custom Helper Functions in Laravel 6 Example
  7. Read Also:  Display Uploaded Image Using Javascript Example
  8. Read Also:  jQuery Background Change
  9. Read Also:  jQuery Validate Email address using Regex Expression
  10. Read Also:  PHP access Global-Superglobals array Variables
CLOSEX