PageSourceSearch

https://www.visitmorningtonpeninsula.org/DesktopModules/DnnSharp/A…/at-least-one-positive-integer.js?cdv=365

js visitmorningtonpeninsula.org collected 2026-10-02 07:07:11 UTC 1,795 bytes, 35 lines download raw bytes

1dnnsfjQuery(function () {
2    var $ = dnnsfjQuery;
3    for (var i = 0; i < 10; i++) {
4        (function (igroup) {
5            $.validator && $.validator.addMethod('group' + igroup + '-AtLeastOnePositiveInteger', function (value, element) {
6                var isValid = false;
7                $(element).parents('.c-form:first').find('.group' + igroup + '-AtLeastOnePositiveInteger').each(function () {
8                    if (!isValid && isPositiveInteger($(this).val())) {
9                        isValid = true;
10                    }
11                });
12
13                // validate the rest of the controls in the group, but watch out for recursion
14                if (!window['group' + igroup + '-AtLeastOnePositiveInteger-check']) {
15                    window['group' + igroup + '-AtLeastOnePositiveInteger-check'] = true;
16                    $(element).parents('.c-form:first').find('.group' + igroup + '-AtLeastOnePositiveInteger').each(function () {
17                        if ($(this).valid()) { // using the structure of tabspro, repair this if it changes
18                            $(this).closest('.tab-content').prev().find('.tabButton.active > .tabLink').removeClass('has-error');
19                        } else {
20                            $(this).closest('.tab-content').prev().find('.tabButton.active > .tabLink').addClass('has-error');
21                        }
22                    });
23                    window['group' + igroup + '-AtLeastOnePositiveInteger-check'] = false;
24                }
25
26                return isValid;
27            }, 'At least one strictly positive integer is required');
28        })(i);
29    }
30
31    function isPositiveInteger(str) {
32        numberShifted = str >>> 0;
33        return numberShifted > 0 && numberShifted === parseFloat(str);
34    }
35});

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.