1export function RegExMaskValidator(element, elementId, editMask) { 2 this.elementId = elementId; 3 this.element = element; 4 this.editMask = editMask; 5 this.regex = function () { 6 return new RegExp(this.editMask); 7 }; 8 this.carret = function () { 9 return [this.element.selectionStart, this.element.selectionEnd]; 10 }; 11 this.isValid = function (currentValue) { 12 var value = this.element.value, 13 selection = this.carret(); 14 15 return value = value.substring(0, selection[0]) + currentValue + value.substring(selection[1]), !!this.regex().test(value); 16 }; 17}
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.