Hello guys, I am having a problem with a regular expression in my jquery validation. Can someone help me please.

The method :

$.validator.addMethod(

        function (value, element) {
           /^[A-Z]{1}\d{12}[A-Z0-9]{1}$/.test( value );
        },
        "Invalid NIC."
);

An example of the NIC field : L261089652789A or L2610896527897

Member Avatar for iamthwee

Not enough information, what is a NIC field? Is it a national insurance number? If so what country is it for?

Provide test cases.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.