NG1NDEX
Server IP : 150.95.80.236  /  Your IP : 3.147.28.206
Web Server : Apache
System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : social-telecare ( 10000)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/plugins/formvalidation/dist/amd/validators/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/plugins/formvalidation/dist/amd/validators//choice.js
define(["require", "exports", "../utils/format"], function (require, exports, format_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    function choice() {
        return {
            validate: function (input) {
                var numChoices = 'select' === input.element.tagName.toLowerCase()
                    ? input.element.querySelectorAll('option:checked').length
                    : input.elements.filter(function (ele) { return ele.checked; }).length;
                var min = input.options.min ? "" + input.options.min : '';
                var max = input.options.max ? "" + input.options.max : '';
                var msg = input.l10n ? input.options.message || input.l10n.choice.default : input.options.message;
                var isValid = !((min && numChoices < parseInt(min, 10)) || (max && numChoices > parseInt(max, 10)));
                switch (true) {
                    case !!min && !!max:
                        msg = (0, format_1.default)(input.l10n ? input.l10n.choice.between : input.options.message, [min, max]);
                        break;
                    case !!min:
                        msg = (0, format_1.default)(input.l10n ? input.l10n.choice.more : input.options.message, min);
                        break;
                    case !!max:
                        msg = (0, format_1.default)(input.l10n ? input.l10n.choice.less : input.options.message, max);
                        break;
                    default:
                        break;
                }
                return {
                    message: msg,
                    valid: isValid,
                };
            },
        };
    }
    exports.default = choice;
});

Anon7 - 2022
AnonSec Team