1 line
43 KiB
Plaintext
1 line
43 KiB
Plaintext
{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.plugin\",\"commonjs\":\"./foundation.core.plugin\",\"commonjs2\":\"./foundation.core.plugin\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.utils\",\"commonjs\":\"./foundation.core.utils\",\"commonjs2\":\"./foundation.core.utils\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.abide.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.abide.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","plugin","Abide","element","options","$element","$","extend","defaults","data","className","_init","$inputs","merge","find","not","$globalErrors","a11yAttributes","each","i","input","addA11yAttributes","error","addGlobalErrorA11yAttributes","_events","off","on","resetForm","validateForm","validateOn","e","validateInput","target","liveValidate","validateOnBlur","$el","attr","isGood","type","checked","opt","length","val","id","$error","siblings","formErrorSelector","parent","add","$label","closest","$els","labels","map","el","findLabel","$formError","findFormError","addClass","labelErrorClass","formErrorClass","inputErrorClass","$errors","$labels","filter","first","errorId","GetYoDigits","elemId","label","end","a11yErrorLevel","groupName","findRadioLabels","$formErrors","removeClass","removeRadioErrorClasses","clearRequire","requiredCheck","validated","customValidator","validator","equalTo","is","validateRadio","validateText","matchValidation","validators","goodToGo","indexOf","message","dependentElements","_this","trigger","acc","push","noError","elem","$elem","css","pattern","inputText","valid","patterns","hasOwnProperty","test","RegExp","prop","$group","required","clear","split","v","$form","opts","removeErrorClasses","Plugin","alpha","alpha_numeric","integer","number","card","cvv","email","url","domain","datetime","date","time","dateISO","month_day_year","day_month_year","color","website","text"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,8D;;;;;;;;;;;ACAA,qE;;;;;;;;;;;ACAA,oE;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACAA,2DAAU,CAACC,MAAX,CAAkBC,uDAAlB,EAAyB,OAAzB;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;;;;;;;;;;;;;;;;;AAEb;AACA;AACA;AAEA;;;;;IAKMA,K;;;;;;;;;;;;;;AACJ;;;;;;;;2BAQOC,O,EAAuB;AAAA,UAAdC,OAAc,uEAAJ,EAAI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,EAAG,qCAjCA;AAmCR;AACAC,WAAO,EAAE;AACP5B,UAAI,EAAE,cAAC6B,IAAD,EAAU;AACd,eAAOpI,KAAK,CAACM,QAAN,CAAe+F,QAAf,CAAwB,QAAxB,EAAkCE,IAAlC,CAAuC6B,IAAvC,KAAgDpI,KAAK,CAACM,QAAN,CAAe+F,QAAf,CAAwB,KAAxB,EAA+BE,IAA/B,CAAoC6B,IAApC,CAAvD;AACD;AAHM;AApCD,GA/EK;;AA0Hf;;;;;;;;AAQA/C,YAAU,EAAE;AACVL,WAAO,EAAE,iBAAU5B,EAAV,EAAcuD,QAAd,EAAwB9D,MAAxB,EAAgC;AACvC,aAAOzC,6CAAC,YAAKgD,EAAE,CAAClB,IAAH,CAAQ,cAAR,CAAL,EAAD,CAAiCM,GAAjC,OAA2CY,EAAE,CAACZ,GAAH,EAAlD;AACD;AAHS;AAlIG,CAAjB;;;;;;;;;;;;;;;;;;;;;;;;ACtjBA,oD","file":"foundation.abide.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"./foundation.core.plugin\"), require(\"./foundation.core.utils\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"./foundation.core.plugin\", \"./foundation.core.utils\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.abide\"] = factory(require(\"./foundation.core\"), require(\"./foundation.core.plugin\"), require(\"./foundation.core.utils\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.abide\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__, __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__;","import { Foundation } from './foundation.core';\n\nimport { Abide } from '../../foundation.abide';\nFoundation.plugin(Abide, 'Abide');\n\nexport { Foundation, Abide };\n","'use strict';\n\nimport $ from 'jquery';\nimport { Plugin } from './foundation.core.plugin';\nimport { GetYoDigits } from './foundation.core.utils';\n\n/**\n * Abide module.\n * @module foundation.abide\n */\n\nclass Abide extends Plugin {\n /**\n * Creates a new instance of Abide.\n * @class\n * @name Abide\n * @fires Abide#init\n * @param {Object} element - jQuery object to add the trigger to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options = {}) {\n this.$element = element;\n this.options = $.extend(true, {}, Abide.defaults, this.$element.data(), options);\n\n this.className = 'Abide'; // ie9 back compat\n this._init();\n }\n\n /**\n * Initializes the Abide plugin and calls functions to get Abide functioning on load.\n * @private\n */\n _init() {\n this.$inputs = $.merge( // Consider as input to validate:\n this.$element.find('input').not('[type=submit]'), // * all input fields expect submit\n this.$element.find('textarea, select') // * all textareas and select fields\n );\n const $globalErrors = this.$element.find('[data-abide-error]');\n\n // Add a11y attributes to all fields\n if (this.options.a11yAttributes) {\n this.$inputs.each((i, input) => this.addA11yAttributes($(input)));\n $globalErrors.each((i, error) => this.addGlobalErrorA11yAttributes($(error)));\n }\n\n this._events();\n }\n\n /**\n * Initializes events for Abide.\n * @private\n */\n _events() {\n this.$element.off('.abide')\n .on('reset.zf.abide', () => {\n this.resetForm();\n })\n .on('submit.zf.abide', () => {\n return this.validateForm();\n });\n\n if (this.options.validateOn === 'fieldChange') {\n this.$inputs\n .off('change.zf.abide')\n .on('change.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.liveValidate) {\n this.$inputs\n .off('input.zf.abide')\n .on('input.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n\n if (this.options.validateOnBlur) {\n this.$inputs\n .off('blur.zf.abide')\n .on('blur.zf.abide', (e) => {\n this.validateInput($(e.target));\n });\n }\n }\n\n /**\n * Calls necessary functions to update Abide upon DOM change\n * @private\n */\n _reflow() {\n this._init();\n }\n\n /**\n * Checks whether or not a form element has the required attribute and if it's checked or not\n * @param {Object} element - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n requiredCheck($el) {\n if (!$el.attr('required')) return true;\n\n var isGood = true;\n\n switch ($el[0].type) {\n case 'checkbox':\n isGood = $el[0].checked;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n var opt = $el.find('option:selected');\n if (!opt.length || !opt.val()) isGood = false;\n break;\n\n default:\n if(!$el.val() || !$el.val().length) isGood = false;\n }\n\n return isGood;\n }\n\n /**\n * Get:\n * - Based on $el, the first element(s) corresponding to `formErrorSelector` in this order:\n * 1. The element's direct sibling('s).\n * 2. The element's parent's children.\n * - Element(s) with the attribute `[data-form-error-for]` set with the element's id.\n *\n * This allows for multiple form errors per input, though if none are found, no form errors will be shown.\n *\n * @param {Object} $el - jQuery object to use as reference to find the form error selector.\n * @returns {Object} jQuery object with the selector.\n */\n findFormError($el) {\n var id = $el[0].id;\n var $error = $el.siblings(this.options.formErrorSelector);\n\n if (!$error.length) {\n $error = $el.parent().find(this.options.formErrorSelector);\n }\n\n if (id) {\n $error = $error.add(this.$element.find(`[data-form-error-for=\"${id}\"]`));\n }\n\n return $error;\n }\n\n /**\n * Get the first element in this order:\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findLabel($el) {\n var id = $el[0].id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n return $el.closest('label');\n }\n\n return $label;\n }\n\n /**\n * Get the set of labels associated with a set of radio els in this order\n * 2. The <label> with the attribute `[for=\"someInputId\"]`\n * 3. The `.closest()` <label>\n *\n * @param {Object} $el - jQuery object to check for required attribute\n * @returns {Boolean} Boolean value depends on whether or not attribute is checked or empty\n */\n findRadioLabels($els) {\n var labels = $els.map((i, el) => {\n var id = el.id;\n var $label = this.$element.find(`label[for=\"${id}\"]`);\n\n if (!$label.length) {\n $label = $(el).closest('label');\n }\n return $label[0];\n });\n\n return $(labels);\n }\n\n /**\n * Adds the CSS error class as specified by the Abide settings to the label, input, and the form\n * @param {Object} $el - jQuery object to add the class to\n */\n addErrorClasses($el) {\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el);\n\n if ($label.length) {\n $label.addClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.addClass(this.options.formErrorClass);\n }\n\n $el.addClass(this.options.inputErrorClass).attr({\n 'data-invalid': '',\n 'aria-invalid': true\n });\n }\n\n /**\n * Adds [for] and [role=alert] attributes to all form error targetting $el,\n * and [aria-describedby] attribute to $el toward the first form error.\n * @param {Object} $el - jQuery object\n */\n addA11yAttributes($el) {\n let $errors = this.findFormError($el);\n let $labels = $errors.filter('label');\n let $error = $errors.first();\n if (!$errors.length) return;\n\n // Set [aria-describedby] on the input toward the first form error if it is not set\n if (typeof $el.attr('aria-describedby') === 'undefined') {\n // Get the first error ID or create one\n let errorId = $error.attr('id');\n if (typeof errorId === 'undefined') {\n errorId = GetYoDigits(6, 'abide-error');\n $error.attr('id', errorId);\n };\n\n $el.attr('aria-describedby', errorId);\n }\n\n if ($labels.filter('[for]').length < $labels.length) {\n // Get the input ID or create one\n let elemId = $el.attr('id');\n if (typeof elemId === 'undefined') {\n elemId = GetYoDigits(6, 'abide-input');\n $el.attr('id', elemId);\n };\n\n // For each label targeting $el, set [for] if it is not set.\n $labels.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('for') === 'undefined')\n $label.attr('for', elemId);\n });\n }\n\n // For each error targeting $el, set [role=alert] if it is not set.\n $errors.each((i, label) => {\n const $label = $(label);\n if (typeof $label.attr('role') === 'undefined')\n $label.attr('role', 'alert');\n }).end();\n }\n\n /**\n * Adds [aria-live] attribute to the given global form error $el.\n * @param {Object} $el - jQuery object to add the attribute to\n */\n addGlobalErrorA11yAttributes($el) {\n if (typeof $el.attr('aria-live') === 'undefined')\n $el.attr('aria-live', this.options.a11yErrorLevel);\n }\n\n /**\n * Remove CSS error classes etc from an entire radio button group\n * @param {String} groupName - A string that specifies the name of a radio button group\n *\n */\n removeRadioErrorClasses(groupName) {\n var $els = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var $labels = this.findRadioLabels($els);\n var $formErrors = this.findFormError($els);\n\n if ($labels.length) {\n $labels.removeClass(this.options.labelErrorClass);\n }\n\n if ($formErrors.length) {\n $formErrors.removeClass(this.options.formErrorClass);\n }\n\n $els.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n\n }\n\n /**\n * Removes CSS error class as specified by the Abide settings from the label, input, and the form\n * @param {Object} $el - jQuery object to remove the class from\n */\n removeErrorClasses($el) {\n // radios need to clear all of the els\n if($el[0].type == 'radio') {\n return this.removeRadioErrorClasses($el.attr('name'));\n }\n\n var $label = this.findLabel($el);\n var $formError = this.findFormError($el);\n\n if ($label.length) {\n $label.removeClass(this.options.labelErrorClass);\n }\n\n if ($formError.length) {\n $formError.removeClass(this.options.formErrorClass);\n }\n\n $el.removeClass(this.options.inputErrorClass).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n }\n\n /**\n * Goes through a form to find inputs and proceeds to validate them in ways specific to their type.\n * Ignores inputs with data-abide-ignore, type=\"hidden\" or disabled attributes set\n * @fires Abide#invalid\n * @fires Abide#valid\n * @param {Object} element - jQuery object to validate, should be an HTML input\n * @returns {Boolean} goodToGo - If the input is valid or not.\n */\n validateInput($el) {\n var clearRequire = this.requiredCheck($el),\n validated = false,\n customValidator = true,\n validator = $el.attr('data-validator'),\n equalTo = true;\n\n // don't validate ignored inputs or hidden inputs or disabled inputs\n if ($el.is('[data-abide-ignore]') || $el.is('[type=\"hidden\"]') || $el.is('[disabled]')) {\n return true;\n }\n\n switch ($el[0].type) {\n case 'radio':\n validated = this.validateRadio($el.attr('name'));\n break;\n\n case 'checkbox':\n validated = clearRequire;\n break;\n\n case 'select':\n case 'select-one':\n case 'select-multiple':\n validated = clearRequire;\n break;\n\n default:\n validated = this.validateText($el);\n }\n\n if (validator) {\n customValidator = this.matchValidation($el, validator, $el.attr('required'));\n }\n\n if ($el.attr('data-equalto')) {\n equalTo = this.options.validators.equalTo($el);\n }\n\n\n var goodToGo = [clearRequire, validated, customValidator, equalTo].indexOf(false) === -1;\n var message = (goodToGo ? 'valid' : 'invalid') + '.zf.abide';\n\n if (goodToGo) {\n // Re-validate inputs that depend on this one with equalto\n const dependentElements = this.$element.find(`[data-equalto=\"${$el.attr('id')}\"]`);\n if (dependentElements.length) {\n let _this = this;\n dependentElements.each(function() {\n if ($(this).val()) {\n _this.validateInput($(this));\n }\n });\n }\n }\n\n this[goodToGo ? 'removeErrorClasses' : 'addErrorClasses']($el);\n\n /**\n * Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide`\n * Trigger includes the DOM element of the input.\n * @event Abide#valid\n * @event Abide#invalid\n */\n $el.trigger(message, [$el]);\n\n return goodToGo;\n }\n\n /**\n * Goes through a form and if there are any invalid inputs, it will display the form error element\n * @returns {Boolean} noError - true if no errors were detected...\n * @fires Abide#formvalid\n * @fires Abide#forminvalid\n */\n validateForm() {\n var acc = [];\n var _this = this;\n\n this.$inputs.each(function() {\n acc.push(_this.validateInput($(this)));\n });\n\n var noError = acc.indexOf(false) === -1;\n\n this.$element.find('[data-abide-error]').each((i, elem) => {\n const $elem = $(elem);\n // Ensure a11y attributes are set\n if (this.options.a11yAttributes) this.addGlobalErrorA11yAttributes($elem);\n // Show or hide the error\n $elem.css('display', (noError ? 'none' : 'block'));\n });\n\n /**\n * Fires when the form is finished validating. Event trigger is either `formvalid.zf.abide` or `forminvalid.zf.abide`.\n * Trigger includes the element of the form.\n * @event Abide#formvalid\n * @event Abide#forminvalid\n */\n this.$element.trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]);\n\n return noError;\n }\n\n /**\n * Determines whether or a not a text input is valid based on the pattern specified in the attribute. If no matching pattern is found, returns true.\n * @param {Object} $el - jQuery object to validate, should be a text input HTML element\n * @param {String} pattern - string value of one of the RegEx patterns in Abide.options.patterns\n * @returns {Boolean} Boolean value depends on whether or not the input value matches the pattern specified\n */\n validateText($el, pattern) {\n // A pattern can be passed to this function, or it will be infered from the input's \"pattern\" attribute, or it's \"type\" attribute\n pattern = (pattern || $el.attr('pattern') || $el.attr('type'));\n var inputText = $el.val();\n var valid = false;\n\n if (inputText.length) {\n // If the pattern attribute on the element is in Abide's list of patterns, then test that regexp\n if (this.options.patterns.hasOwnProperty(pattern)) {\n valid = this.options.patterns[pattern].test(inputText);\n }\n // If the pattern name isn't also the type attribute of the field, then test it as a regexp\n else if (pattern !== $el.attr('type')) {\n valid = new RegExp(pattern).test(inputText);\n }\n else {\n valid = true;\n }\n }\n // An empty field is valid if it's not required\n else if (!$el.prop('required')) {\n valid = true;\n }\n\n return valid;\n }\n\n /**\n * Determines whether or a not a radio input is valid based on whether or not it is required and selected. Although the function targets a single `<input>`, it validates by checking the `required` and `checked` properties of all radio buttons in its group.\n * @param {String} groupName - A string that specifies the name of a radio button group\n * @returns {Boolean} Boolean value depends on whether or not at least one radio input has been selected (if it's required)\n */\n validateRadio(groupName) {\n // If at least one radio in the group has the `required` attribute, the group is considered required\n // Per W3C spec, all radio buttons in a group should have `required`, but we're being nice\n var $group = this.$element.find(`:radio[name=\"${groupName}\"]`);\n var valid = false, required = false;\n\n // For the group to be required, at least one radio needs to be required\n $group.each((i, e) => {\n if ($(e).attr('required')) {\n required = true;\n }\n });\n if(!required) valid=true;\n\n if (!valid) {\n // For the group to be valid, at least one radio needs to be checked\n $group.each((i, e) => {\n if ($(e).prop('checked')) {\n valid = true;\n }\n });\n };\n\n return valid;\n }\n\n /**\n * Determines if a selected input passes a custom validation function. Multiple validations can be used, if passed to the element with `data-validator=\"foo bar baz\"` in a space separated listed.\n * @param {Object} $el - jQuery input element.\n * @param {String} validators - a string of function names matching functions in the Abide.options.validators object.\n * @param {Boolean} required - self explanatory?\n * @returns {Boolean} - true if validations passed.\n */\n matchValidation($el, validators, required) {\n required = required ? true : false;\n\n var clear = validators.split(' ').map((v) => {\n return this.options.validators[v]($el, required, $el.parent());\n });\n return clear.indexOf(false) === -1;\n }\n\n /**\n * Resets form inputs and styles\n * @fires Abide#formreset\n */\n resetForm() {\n var $form = this.$element,\n opts = this.options;\n\n $(`.${opts.labelErrorClass}`, $form).not('small').removeClass(opts.labelErrorClass);\n $(`.${opts.inputErrorClass}`, $form).not('small').removeClass(opts.inputErrorClass);\n $(`${opts.formErrorSelector}.${opts.formErrorClass}`).removeClass(opts.formErrorClass);\n $form.find('[data-abide-error]').css('display', 'none');\n $(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:radio', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n $(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked',false).attr({\n 'data-invalid': null,\n 'aria-invalid': null\n });\n /**\n * Fires when the form has been reset.\n * @event Abide#formreset\n */\n $form.trigger('formreset.zf.abide', [$form]);\n }\n\n /**\n * Destroys an instance of Abide.\n * Removes error styles and classes from elements, without resetting their values.\n */\n _destroy() {\n var _this = this;\n this.$element\n .off('.abide')\n .find('[data-abide-error]')\n .css('display', 'none');\n\n this.$inputs\n .off('.abide')\n .each(function() {\n _this.removeErrorClasses($(this));\n });\n }\n}\n\n/**\n * Default settings for plugin\n */\nAbide.defaults = {\n /**\n * The default event to validate inputs. Checkboxes and radios validate immediately.\n * Remove or change this value for manual validation.\n * @option\n * @type {?string}\n * @default 'fieldChange'\n */\n validateOn: 'fieldChange',\n\n /**\n * Class to be applied to input labels on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-label'\n */\n labelErrorClass: 'is-invalid-label',\n\n /**\n * Class to be applied to inputs on failed validation.\n * @option\n * @type {string}\n * @default 'is-invalid-input'\n */\n inputErrorClass: 'is-invalid-input',\n\n /**\n * Class selector to use to target Form Errors for show/hide.\n * @option\n * @type {string}\n * @default '.form-error'\n */\n formErrorSelector: '.form-error',\n\n /**\n * Class added to Form Errors on failed validation.\n * @option\n * @type {string}\n * @default 'is-visible'\n */\n formErrorClass: 'is-visible',\n\n /**\n * If true, automatically insert when possible:\n * - `[aria-describedby]` on fields\n * - `[role=alert]` on form errors and `[for]` on form error labels\n * - `[aria-live]` on global errors `[data-abide-error]` (see option `a11yErrorLevel`).\n * @option\n * @type {boolean}\n * @default true\n */\n a11yAttributes: true,\n\n /**\n * [aria-live] attribute value to be applied on global errors `[data-abide-error]`.\n * Options are: 'assertive', 'polite' and 'off'/null\n * @option\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions\n * @type {string}\n * @default 'assertive'\n */\n a11yErrorLevel: 'assertive',\n\n /**\n * Set to true to validate text inputs on any value change.\n * @option\n * @type {boolean}\n * @default false\n */\n liveValidate: false,\n\n /**\n * Set to true to validate inputs on blur.\n * @option\n * @type {boolean}\n * @default false\n */\n validateOnBlur: false,\n\n patterns: {\n alpha : /^[a-zA-Z]+$/,\n alpha_numeric : /^[a-zA-Z0-9]+$/,\n integer : /^[-+]?\\d+$/,\n number : /^[-+]?\\d*(?:[\\.\\,]\\d+)?$/,\n\n // amex, visa, diners\n card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$/,\n cvv : /^([0-9]){3,4}$/,\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address\n email : /^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,\n\n // From CommonRegexJS (@talyssonoc)\n // https://github.com/talyssonoc/CommonRegexJS/blob/e2901b9f57222bc14069dc8f0598d5f412555411/lib/commonregex.js#L76\n // For more restrictive URL Regexs, see https://mathiasbynens.be/demo/url-regex.\n url: /^((?:(https?|ftps?|file|ssh|sftp):\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\))+(?:\\((?:[^\\s()<>]+|(?:\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?\\xab\\xbb\\u201c\\u201d\\u2018\\u2019]))$/,\n\n // abc.de\n domain : /^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,8}$/,\n\n datetime : /^([0-2][0-9]{3})\\-([0-1][0-9])\\-([0-3][0-9])T([0-5][0-9])\\:([0-5][0-9])\\:([0-5][0-9])(Z|([\\-\\+]([0-1][0-9])\\:00))$/,\n // YYYY-MM-DD\n date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,\n // HH:MM:SS\n time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,\n dateISO : /^\\d{4}[\\/\\-]\\d{1,2}[\\/\\-]\\d{1,2}$/,\n // MM/DD/YYYY\n month_day_year : /^(0[1-9]|1[012])[- \\/.](0[1-9]|[12][0-9]|3[01])[- \\/.]\\d{4}$/,\n // DD/MM/YYYY\n day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \\/.](0[1-9]|1[012])[- \\/.]\\d{4}$/,\n\n // #FFF or #FFFFFF\n color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,\n\n // Domain || URL\n website: {\n test: (text) => {\n return Abide.defaults.patterns['domain'].test(text) || Abide.defaults.patterns['url'].test(text);\n }\n }\n },\n\n /**\n * Optional validation functions to be used. `equalTo` being the only default included function.\n * Functions should return only a boolean if the input is valid or not. Functions are given the following arguments:\n * el : The jQuery element to validate.\n * required : Boolean value of the required attribute be present or not.\n * parent : The direct parent of the input.\n * @option\n */\n validators: {\n equalTo: function (el, required, parent) {\n return $(`#${el.attr('data-equalto')}`).val() === el.val();\n }\n }\n}\n\nexport {Abide};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""} |