[Solved] How can I validate a regular expression using jQuery Validation plugin?


No need for jQuery. Use the RegExp constructor and catch the exception :

try {
    new RegExp(someString);
    console.log('good'); 
} catch (e) {
    console.log('bad'); 
}

Demonstration (type something in the input to know if it’s a well formed regular expression)

2

solved How can I validate a regular expression using jQuery Validation plugin?