Current Path : /storage/v11800/affypharma/public_html/wp-content/plugins/w3-total-cache/pub/js/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/affypharma/public_html/wp-content/plugins/w3-total-cache/pub/js/options-validator.js |
jQuery(document).ready(function() {
jQuery('textarea[w3tc-data-validator="regexps"]').change(function() {
var v = jQuery(this).val();
var items = v.split("\n");
for (var n = 0; n < items.length; n++) {
var regexp = items[n].trim();
if (regexp.length > 0) {
try {
new RegExp(regexp);
} catch(e) {
var error = 'Contains invalid regexp ' + regexp +', please fix';
console.log(error);
jQuery(this)[0].setCustomValidity(error);
return;
}
}
}
jQuery(this)[0].setCustomValidity('');
});
});