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

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

Jump to Post

All 2 Replies

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.