Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to pass custom regex in jquery validation

$("#Textbox").rules("add", { regex: "^[a-zA-Z'.s]{1,40}$" })
Comment

how to pass custom regex in jquery validation

$.validator.addMethod(
        "regex",
        function(value, element, regexp) {
            var re = new RegExp(regexp);
            return this.optional(element) || re.test(value);
        },
        "Please check your input."
);
Comment

PREVIOUS NEXT
Code Example
Javascript :: count using sequelize.fn 
Javascript :: index of an element 
Javascript :: fibonacci series with recursion in javascript 
Javascript :: remove item from array javascript 
Javascript :: discord.js get user by username 
Javascript :: find element by object field vuejs 
Javascript :: kick commands discord.js 
Javascript :: css vw not working on mobile 
Javascript :: express session mongoose 
Javascript :: async function 
Javascript :: how to destroy a computer using javascript 
Javascript :: nodejs save blob file 
Javascript :: get parameter from url reactjs 
Javascript :: json data example 
Javascript :: navlink 
Javascript :: backtick string javascript 
Javascript :: electron js nodeintegration 
Javascript :: how to include js file in react 
Javascript :: react toastify is not working 
Javascript :: change text shadow javascript 
Javascript :: moment format yyyy-mm-dd 
Javascript :: javascript how to get last property of object 
Javascript :: isChecked radio button jQuery 
Javascript :: acheck angular version 
Javascript :: axios response.json 
Javascript :: javascript createelement innerhtml 
Javascript :: deploy react to aws 
Javascript :: convert string to camelcase 
Javascript :: how to convert string to alternate case in javascript 
Javascript :: javascript countdown 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =