PageSourceSearch

https://nfbla.org/modules/contrib/clientside_validation/clientside…/js/cv.pattern.method.js?tm2g37

js nfbla.org collected 2026-09-28 09:39:03 UTC 544 bytes, 19 lines download raw bytes

1/**
2 * @file
3 * Copied from jquery-validation additional-methods.
4 *
5 * Adapted to Drupal js coding standards. This allows using a regex pattern
6 * for the validation without having to load the 40+ KB of js in
7 * additional-methods.js.
8 */
9(function ($) {
10  $.validator.addMethod('pattern', function (value, element, param) {
11    if (this.optional(element)) {
12      return true;
13    }
14    if (typeof param === 'string') {
15      param = new RegExp('^(?:' + param + ')$');
16    }
17    return param.test(value);
18  }, 'Invalid format.');
19})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.