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

Recommended Answers

All 2 Replies

Member Avatar

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

Be a part of the DaniWeb community

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