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 filterBy orderBy CustomFilter Example

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:  Google Customize Timelines Charts

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.