{"version":3,"sources":["kendo.validator.js"],"names":["f","define","$","undefined","resolveRules","element","name","resolvers","kendo","ui","validator","ruleResolvers","rules","extend","resolve","decode","value","replace","numberOfDecimalDigits","split","length","parseHtml","text","parseHTML","searchForMessageContainer","elements","fieldName","attr","idx","containers","invalidMsgRegExp","test","className","getAttribute","add","isLabelFor","label","nodeName","SUMMARYTEMPLATE","Validator","window","Widget","NS","INVALIDMSG","RegExp","INVALIDINPUT","VALIDINPUT","VALIDATIONSUMMARY","INVALIDLABEL","MESSAGEBOX","INPUTINNER","INPUTWRAPPER","ARIAINVALID","ARIADESCRIBEDBY","emailRegExp","urlRegExp","INPUTSELECTOR","CHECKBOXSELECTOR","NUMBERINPUTSELECTOR","BLUR","NAME","FORM","NOVALIDATE","VALIDATE","CHANGE","VALIDATE_INPUT","proxy","patternMatcher","pattern","matcher","input","selector","val","filter","hasAttribute","attributes","messages","allowSubmit","noop","validateOnInit","init","options","that","this","resolved","validateAttributeSelector","fn","call","_errorTemplate","template","errorTemplate","_summaryTemplate","validationSummary","is","_inputSelector","_checkboxSelector","_errors","_attachEvents","_isValidated","_validateOnInit","validate","events","required","min","max","step","email","url","date","dateCompare","captcha","noNameCheckbox","namedCheckbox","find","checkbox","radio","parseFloat","raise","decimals","Math","pow","floor","parseDate","widgetInstance","isValidated","isValid","data","getCaptchaId","_validating","done","_checkElement","fail","error","console","warn","removeData","validateOnBlur","_allowSubmit","errors","destroy","off","_submit","e","stopPropagation","stopImmediatePropagation","preventDefault","state","validateInput","trigger","on","inputs","invalid","result","eq","showValidationSummary","valid","lbl","messageText","messageLabel","wasValid","isInputInner","inputWrapper","lblId","parentElement","nextElement","prevElement","widget","inputWrap","inputLabel","errorId","_checkValidity","_findMessageContainer","next","addClass","_extractMessage","key","message","field","parent","removeAttr","_decorateMessageContainer","replaceWith","get","prev","closest","insertAfter","wrapper","removeClass","toggleClass","_inputWrapper","_inputLabel","_associateMessageContainer","hideMessages","_disassociateMessageContainers","reset","labels","hideValidationSummary","locators","messageLocators","getElementsByTagName","locate","container","decorate","ruleKey","nonDefaultMessage","customMessage","prototype","isFunction","format","rule","results","push","setOptions","deepExtend","_setEvents","_getInputNames","sorted","indexOf","nextFocusable","getWidgetFocusableElement","toggleAttribute","i","addBack","_errorsByName","inputNames","_renderSummary","hasClass","insertBefore","join","_summaryClick","link","target","errorsList","summary","html","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,mBAAoB,cAAeD,IAC5C,WAmiBE,MA3hBC,UAAUE,EAAGC,GA0BV,QAASC,GAAaC,GAClB,GAAoEC,GAAhEC,EAAYC,EAAMC,GAAGC,UAAUC,kBAAqBC,IACxD,KAAKN,IAAQC,GACTL,EAAEW,QAAO,EAAMD,EAAOL,EAAUD,GAAMQ,QAAQT,GAElD,OAAOO,GAEX,QAASG,GAAOC,GACZ,MAAOA,GAAMC,QAAQ,QAAS,SAASA,QAAQ,UAAW,KAAKA,QAAQ,SAAU,KAAMA,QAAQ,QAAS,KAAKA,QAAQ,QAAS,KAElI,QAASC,GAAsBF,GAE3B,MADAA,IAASA,EAAQ,IAAIG,MAAM,KACvBH,EAAMI,OAAS,EACRJ,EAAM,GAAGI,OAEb,EAEX,QAASC,GAAUC,GACf,MACWpB,GADPA,EAAEqB,UACOrB,EAAEqB,UAAUD,GAEhBA,GAEb,QAASE,GAA0BC,EAAUC,GAA7C,GAC0BrB,GAASsB,EACtBC,EAASR,EADdS,EAAa3B,GACjB,KAAS0B,EAAM,EAAGR,EAASK,EAASL,OAAQQ,EAAMR,EAAQQ,IACtDvB,EAAUoB,EAASG,GACfE,EAAiBC,KAAK1B,EAAQ2B,aAC9BL,EAAOtB,EAAQ4B,aAAazB,EAAMmB,KAAK,QACnCA,IAASD,IACTG,EAAaA,EAAWK,IAAI7B,IAIxC,OAAOwB,GAEX,QAASM,GAAWC,EAAO/B,GACvB,QAAK+B,IAGyB,gBAAnBA,GAAM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, define) {\n define('kendo.validator', ['kendo.core'], f);\n}(function () {\n var __meta__ = {\n id: 'validator',\n name: 'Validator',\n category: 'web',\n description: 'The Validator offers an easy way to do a client-side form validation.',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, NS = '.kendoValidator', INVALIDMSG = 'k-invalid-msg', invalidMsgRegExp = new RegExp(INVALIDMSG, 'i'), INVALIDINPUT = 'k-invalid', VALIDINPUT = 'k-valid', VALIDATIONSUMMARY = 'k-validation-summary', INVALIDLABEL = 'k-text-error', MESSAGEBOX = 'k-messagebox k-messagebox-error', INPUTINNER = '.k-input-inner', INPUTWRAPPER = '.k-input', ARIAINVALID = 'aria-invalid', ARIADESCRIBEDBY = 'aria-describedby', emailRegExp = /^[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])?)*$/i, urlRegExp = /^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i, INPUTSELECTOR = ':input:not(:button,[type=submit],[type=reset],[disabled],[readonly])', CHECKBOXSELECTOR = ':checkbox:not([disabled],[readonly])', NUMBERINPUTSELECTOR = '[type=number],[type=range]', BLUR = 'blur', NAME = 'name', FORM = 'form', NOVALIDATE = 'novalidate', VALIDATE = 'validate', CHANGE = 'change', VALIDATE_INPUT = 'validateInput', proxy = $.proxy, patternMatcher = function (value, pattern) {\n if (typeof pattern === 'string') {\n pattern = new RegExp('^(?:' + pattern + ')$');\n }\n return pattern.test(value);\n }, matcher = function (input, selector, pattern) {\n var value = input.val();\n if (input.filter(selector).length && value !== '') {\n return patternMatcher(value, pattern);\n }\n return true;\n }, hasAttribute = function (input, name) {\n if (input.length) {\n return input[0].attributes[name] != null;\n }\n return false;\n };\n if (!kendo.ui.validator) {\n kendo.ui.validator = {\n rules: {},\n messages: {},\n allowSubmit: $.noop,\n validateOnInit: $.noop\n };\n }\n function resolveRules(element) {\n var resolvers = kendo.ui.validator.ruleResolvers || {}, rules = {}, name;\n for (name in resolvers) {\n $.extend(true, rules, resolvers[name].resolve(element));\n }\n return rules;\n }\n function decode(value) {\n return value.replace(/&/g, '&').replace(/"/g, '\"').replace(/'/g, '\\'').replace(/</g, '<').replace(/>/g, '>');\n }\n function numberOfDecimalDigits(value) {\n value = (value + '').split('.');\n if (value.length > 1) {\n return value[1].length;\n }\n return 0;\n }\n function parseHtml(text) {\n if ($.parseHTML) {\n return $($.parseHTML(text));\n }\n return $(text);\n }\n function searchForMessageContainer(elements, fieldName) {\n var containers = $(), element, attr;\n for (var idx = 0, length = elements.length; idx < length; idx++) {\n element = elements[idx];\n if (invalidMsgRegExp.test(element.className)) {\n attr = element.getAttribute(kendo.attr('for'));\n if (attr === fieldName) {\n containers = containers.add(element);\n }\n }\n }\n return containers;\n }\n function isLabelFor(label, element) {\n if (!label) {\n return false;\n }\n if (typeof label.nodeName !== 'string' || label.nodeName !== 'LABEL') {\n return false;\n }\n if (typeof label.getAttribute('for') !== 'string' || typeof element.getAttribute('id') !== 'string') {\n return false;\n }\n if (label.getAttribute('for') !== element.getAttribute('id')) {\n return false;\n }\n return true;\n }\n var SUMMARYTEMPLATE = '';\n var Validator = Widget.extend({\n init: function (element, options) {\n var that = this, resolved = resolveRules(element), validateAttributeSelector = '[' + kendo.attr('validate') + '!=false]';\n options = options || {};\n options.rules = $.extend({}, kendo.ui.validator.rules, resolved.rules, options.rules);\n options.messages = $.extend({}, kendo.ui.validator.messages, resolved.messages, options.messages);\n Widget.fn.init.call(that, element, options);\n that._errorTemplate = kendo.template(that.options.errorTemplate);\n that._summaryTemplate = kendo.template(that.options.validationSummary.template || SUMMARYTEMPLATE);\n if (that.element.is(FORM)) {\n that.element.attr(NOVALIDATE, NOVALIDATE);\n }\n that._inputSelector = INPUTSELECTOR + validateAttributeSelector;\n that._checkboxSelector = CHECKBOXSELECTOR + validateAttributeSelector;\n that._errors = {};\n that._attachEvents();\n that._isValidated = false;\n if (that._validateOnInit()) {\n that.validate();\n }\n },\n events: [\n VALIDATE,\n CHANGE,\n VALIDATE_INPUT\n ],\n options: {\n name: 'Validator',\n errorTemplate: '#= message #',\n messages: {\n required: '{0} is required',\n pattern: '{0} is not valid',\n min: '{0} should be greater than or equal to {1}',\n max: '{0} should be smaller than or equal to {1}',\n step: '{0} is not valid',\n email: '{0} is not valid email',\n url: '{0} is not valid URL',\n date: '{0} is not valid date',\n dateCompare: 'End date should be greater than or equal to the start date',\n captcha: 'The text you entered doesn\\'t match the image.'\n },\n rules: {\n required: function (input) {\n var noNameCheckbox = !input.attr('name') && !input.is(':checked'), namedCheckbox = input.attr('name') && !this.element.find('input[name=\"' + input.attr('name') + '\"]:checked').length, checkbox = input.filter('[type=checkbox]').length && (noNameCheckbox || namedCheckbox), radio = input.filter('[type=radio]').length && !this.element.find('input[name=\"' + input.attr('name') + '\"]:checked').length, value = input.val();\n return !(hasAttribute(input, 'required') && (!value || value === '' || value.length === 0 || checkbox || radio));\n },\n pattern: function (input) {\n if (input.filter('[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]').filter('[pattern]').length && input.val() !== '') {\n return patternMatcher(input.val(), input.attr('pattern'));\n }\n return true;\n },\n min: function (input) {\n if (input.filter(NUMBERINPUTSELECTOR + ',[' + kendo.attr('type') + '=number]').filter('[min]').length && input.val() !== '') {\n var min = parseFloat(input.attr('min')) || 0, val = kendo.parseFloat(input.val());\n return min <= val;\n }\n return true;\n },\n max: function (input) {\n if (input.filter(NUMBERINPUTSELECTOR + ',[' + kendo.attr('type') + '=number]').filter('[max]').length && input.val() !== '') {\n var max = parseFloat(input.attr('max')) || 0, val = kendo.parseFloat(input.val());\n return max >= val;\n }\n return true;\n },\n step: function (input) {\n if (input.filter(NUMBERINPUTSELECTOR + ',[' + kendo.attr('type') + '=number]').filter('[step]').length && input.val() !== '') {\n var min = parseFloat(input.attr('min')) || 0, step = parseFloat(input.attr('step')) || 1, val = parseFloat(input.val()), decimals = numberOfDecimalDigits(step), raise;\n if (decimals) {\n raise = Math.pow(10, decimals);\n return Math.floor((val - min) * raise) % (step * raise) / Math.pow(100, decimals) === 0;\n }\n return (val - min) % step === 0;\n }\n return true;\n },\n email: function (input) {\n return matcher(input, '[type=email],[' + kendo.attr('type') + '=email]', emailRegExp);\n },\n url: function (input) {\n return matcher(input, '[type=url],[' + kendo.attr('type') + '=url]', urlRegExp);\n },\n date: function (input) {\n if (input.filter('[type^=date],[' + kendo.attr('type') + '=date]').length && input.val() !== '') {\n return kendo.parseDate(input.val(), input.attr(kendo.attr('format'))) !== null;\n }\n return true;\n },\n captcha: function (input) {\n if (input.filter('[' + kendo.attr('role') + '=captcha]').length) {\n var that = this, captcha = kendo.widgetInstance(input), isValidated = function (isValid) {\n return typeof isValid !== 'undefined' && isValid !== null;\n };\n if (!input.data('captcha_validating') && !isValidated(captcha.isValid()) && !!captcha.getCaptchaId()) {\n input.data('captcha_validating', true);\n that._validating = true;\n captcha.validate().done(function () {\n that._validating = false;\n that._checkElement(input);\n }).fail(function (data) {\n that._validating = false;\n if (data.error && data.error === 'handler_not_defined') {\n window.console.warn('Captcha\\'s validationHandler is not defined! You should either define a proper validation endpoint or declare a callback function to ensure the required behavior.');\n }\n });\n }\n if (isValidated(captcha.isValid())) {\n input.removeData('captcha_validating');\n return captcha.isValid();\n }\n }\n return true;\n }\n },\n validateOnBlur: true,\n validationSummary: false\n },\n _allowSubmit: function () {\n return kendo.ui.validator.allowSubmit(this.element, this.errors());\n },\n _validateOnInit: function () {\n return kendo.ui.validator.validateOnInit(this.element);\n },\n destroy: function () {\n Widget.fn.destroy.call(this);\n this.element.off(NS);\n if (this.validationSummary) {\n this.validationSummary.off(NS);\n this.validationSummary = null;\n }\n },\n value: function () {\n if (!this._isValidated) {\n return false;\n }\n return this.errors().length === 0;\n },\n _submit: function (e) {\n if (!this.validate() && !this._allowSubmit() || this._validating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n e.preventDefault();\n return false;\n }\n return true;\n },\n _checkElement: function (element) {\n var state = this.value();\n this.validateInput(element);\n if (this.value() !== state) {\n this.trigger(CHANGE);\n }\n },\n _attachEvents: function () {\n var that = this;\n if (that.element.is(FORM)) {\n that.element.on('submit' + NS, proxy(that._submit, that));\n }\n if (that.options.validateOnBlur) {\n if (!that.element.is(INPUTSELECTOR)) {\n that.element.on(BLUR + NS, that._inputSelector, function () {\n that._checkElement($(this));\n });\n that.element.on('click' + NS, that._checkboxSelector, function () {\n that._checkElement($(this));\n });\n } else {\n that.element.on(BLUR + NS, function () {\n that._checkElement(that.element);\n });\n if (that.element.is(CHECKBOXSELECTOR)) {\n that.element.on('click' + NS, function () {\n that._checkElement(that.element);\n });\n }\n }\n }\n },\n validate: function () {\n var inputs;\n var idx;\n var result = false;\n var length;\n var isValid = this.value();\n this._errors = {};\n if (!this.element.is(INPUTSELECTOR)) {\n var invalid = false;\n inputs = this.element.find(this._inputSelector);\n for (idx = 0, length = inputs.length; idx < length; idx++) {\n if (!this.validateInput(inputs.eq(idx))) {\n invalid = true;\n }\n }\n result = !invalid;\n } else {\n result = this.validateInput(this.element);\n }\n if (this.options.validationSummary && !isValid) {\n this.showValidationSummary();\n }\n this.trigger(VALIDATE, {\n valid: result,\n errors: this.errors()\n });\n if (isValid !== result) {\n this.trigger(CHANGE);\n }\n return result;\n },\n validateInput: function (input) {\n input = $(input);\n this._isValidated = true;\n var that = this, template = that._errorTemplate, result = that._checkValidity(input), valid = result.valid, className = '.' + INVALIDMSG, fieldName = input.attr(NAME) || '', lbl = that._findMessageContainer(fieldName).add(input.next(className).filter(function () {\n var element = $(this);\n if (element.filter('[' + kendo.attr('for') + ']').length) {\n return element.attr(kendo.attr('for')) === fieldName;\n }\n return true;\n })).addClass('k-hidden'), messageText = !valid ? that._extractMessage(input, result.key) : '', messageLabel = !valid ? parseHtml(template({\n message: decode(messageText),\n field: fieldName\n })) : '', wasValid = !input.attr(ARIAINVALID), isInputInner = input.is(INPUTINNER), inputWrapper = input.parent(INPUTWRAPPER);\n input.removeAttr(ARIAINVALID);\n if (!valid && !input.data('captcha_validating')) {\n that._errors[fieldName] = messageText;\n var lblId = lbl.attr('id');\n that._decorateMessageContainer(messageLabel, fieldName);\n if (lblId) {\n messageLabel.attr('id', lblId);\n }\n if (lbl.length !== 0) {\n lbl.replaceWith(messageLabel);\n } else {\n var widgetInstance = kendo.widgetInstance(input);\n var parentElement = input.parent().get(0);\n var nextElement = input.next().get(0);\n var prevElement = input.prev().get(0);\n if (!widgetInstance && input.is('[type=radio]')) {\n widgetInstance = kendo.widgetInstance(input.closest('.k-radio-list'));\n }\n if (!widgetInstance && input.is('[type=checkbox]')) {\n widgetInstance = kendo.widgetInstance(input.closest('.k-checkbox-list'));\n }\n if (widgetInstance && widgetInstance.wrapper) {\n messageLabel.insertAfter(widgetInstance.wrapper);\n } else if (parentElement && parentElement.nodeName === 'LABEL') {\n messageLabel.insertAfter(parentElement);\n } else if (nextElement && isLabelFor(nextElement, input[0])) {\n messageLabel.insertAfter(nextElement);\n } else if (prevElement && isLabelFor(prevElement, input[0])) {\n messageLabel.insertAfter(input);\n } else if (isInputInner && inputWrapper.length) {\n messageLabel.insertAfter(inputWrapper);\n } else {\n messageLabel.insertAfter(input);\n }\n }\n messageLabel.removeClass('k-hidden');\n input.attr(ARIAINVALID, true);\n } else {\n delete that._errors[fieldName];\n }\n if (wasValid !== valid) {\n this.trigger(VALIDATE_INPUT, {\n valid: valid,\n input: input,\n error: messageText,\n field: fieldName\n });\n }\n if (isInputInner && inputWrapper.length) {\n inputWrapper.toggleClass(INVALIDINPUT, !valid);\n inputWrapper.toggleClass(VALIDINPUT, valid);\n }\n input.toggleClass(INVALIDINPUT, !valid);\n input.toggleClass(VALIDINPUT, valid);\n if (kendo.widgetInstance(input)) {\n var widget = kendo.widgetInstance(input);\n var inputWrap = widget._inputWrapper || widget.wrapper;\n var inputLabel = widget._inputLabel;\n if (inputWrap) {\n inputWrap.toggleClass(INVALIDINPUT, !valid);\n inputWrap.toggleClass(VALIDINPUT, valid);\n }\n if (inputLabel) {\n inputLabel.toggleClass(INVALIDLABEL, !valid);\n }\n }\n if (wasValid !== valid) {\n var errorId = messageLabel ? messageLabel.attr('id') : lbl.attr('id');\n that._associateMessageContainer(input, errorId);\n if (this.options.validationSummary && this.options.validateOnBlur) {\n this.showValidationSummary();\n }\n }\n return valid;\n },\n hideMessages: function () {\n var that = this, className = '.' + INVALIDMSG, element = that.element;\n that._disassociateMessageContainers();\n if (!element.is(INPUTSELECTOR)) {\n element.find(className).addClass('k-hidden');\n } else {\n element.next(className).addClass('k-hidden');\n }\n },\n reset: function () {\n var that = this, inputs = that.element.find('.' + INVALIDINPUT), labels = that.element.find('.' + INVALIDLABEL);\n that._errors = [];\n that.hideMessages();\n that.hideValidationSummary();\n inputs.removeAttr(ARIAINVALID);\n inputs.removeClass(INVALIDINPUT);\n labels.removeClass(INVALIDLABEL);\n },\n _findMessageContainer: function (fieldName) {\n var locators = kendo.ui.validator.messageLocators, name, containers = $();\n for (var idx = 0, length = this.element.length; idx < length; idx++) {\n containers = containers.add(searchForMessageContainer(this.element[idx].getElementsByTagName('*'), fieldName));\n }\n for (name in locators) {\n containers = containers.add(locators[name].locate(this.element, fieldName));\n }\n return containers;\n },\n _decorateMessageContainer: function (container, fieldName) {\n var locators = kendo.ui.validator.messageLocators, name;\n container.addClass(INVALIDMSG).attr(kendo.attr('for'), fieldName || '');\n if (!container.attr('id')) {\n container.attr('id', fieldName + '-error');\n }\n for (name in locators) {\n locators[name].decorate(container, fieldName);\n }\n },\n _extractMessage: function (input, ruleKey) {\n var that = this, customMessage = that.options.messages[ruleKey], fieldName = input.attr(NAME), nonDefaultMessage;\n if (!kendo.ui.Validator.prototype.options.messages[ruleKey]) {\n nonDefaultMessage = kendo.isFunction(customMessage) ? customMessage(input) : customMessage;\n }\n customMessage = kendo.isFunction(customMessage) ? customMessage(input) : customMessage;\n return kendo.format(input.attr(kendo.attr(ruleKey + '-msg')) || input.attr('validationMessage') || nonDefaultMessage || customMessage || input.attr('title') || '', fieldName, input.attr(ruleKey) || input.attr(kendo.attr(ruleKey)));\n },\n _checkValidity: function (input) {\n var rules = this.options.rules, rule;\n for (rule in rules) {\n if (!rules[rule].call(this, input)) {\n return {\n valid: false,\n key: rule\n };\n }\n }\n return { valid: true };\n },\n errors: function () {\n var results = [], errors = this._errors, error;\n for (error in errors) {\n results.push(errors[error]);\n }\n return results;\n },\n setOptions: function (options) {\n if (options.validationSummary) {\n this.hideValidationSummary();\n }\n kendo.deepExtend(this.options, options);\n this.destroy();\n this.init(this.element, this.options);\n this._setEvents(this.options);\n },\n _getInputNames: function () {\n var that = this, inputs = that.element.find(that._inputSelector), sorted = [];\n for (var idx = 0, length = inputs.length; idx < length; idx++) {\n var input = $(inputs[idx]);\n if (hasAttribute(input, NAME)) {\n if (sorted.indexOf(input.attr(NAME)) === -1 || input.closest('.k-checkbox-list').length === 0 && input.closest('.k-radio-list').length === 0) {\n sorted.push(input.attr(NAME));\n }\n }\n }\n return sorted;\n },\n _associateMessageContainer: function (input, errorId) {\n var nextFocusable = kendo.getWidgetFocusableElement(input);\n if (!nextFocusable || !errorId) {\n return;\n }\n kendo.toggleAttribute(nextFocusable, ARIADESCRIBEDBY, errorId);\n },\n _disassociateMessageContainers: function () {\n var that = this, inputs = that.element.find('.' + INVALIDINPUT).addBack(), input, errorId;\n for (var i = 0; i < inputs.length; i += 1) {\n input = $(inputs[i]);\n if (input.is('input')) {\n errorId = that._findMessageContainer(input.attr(NAME)).add(input.next('.' + INVALIDMSG)).attr('id');\n that._associateMessageContainer(input, errorId);\n }\n }\n },\n _errorsByName: function () {\n var that = this, inputNames = that._getInputNames(), sorted = [];\n for (var i = 0; i < inputNames.length; i += 1) {\n var name = inputNames[i];\n if (that._errors[name]) {\n sorted.push({\n field: name,\n message: that._errors[name]\n });\n }\n }\n return sorted;\n },\n _renderSummary: function () {\n var that = this, options = this.options.validationSummary, element = this.element, prevElement = element.prev(), container;\n if (options.container) {\n container = $(options.container);\n } else if (prevElement && prevElement.hasClass(VALIDATIONSUMMARY)) {\n container = prevElement;\n } else {\n container = $('
').insertBefore(that.element);\n }\n container.addClass([\n VALIDATIONSUMMARY,\n MESSAGEBOX\n ].join(' '));\n container.attr('role', 'alert');\n container.on('click' + NS, proxy(that._summaryClick, that));\n return container;\n },\n _summaryClick: function (e) {\n e.preventDefault();\n var that = this, link = $(e.target), target = that.element.find('[name=\\'' + link.data('field') + '\\']'), nextFocusable;\n if (!target.length) {\n return;\n }\n nextFocusable = kendo.getWidgetFocusableElement(target);\n if (nextFocusable) {\n nextFocusable.trigger('focus');\n }\n },\n showValidationSummary: function () {\n var that = this, summary = that.validationSummary, errors = that._errorsByName(), errorsList;\n if (!summary) {\n summary = that.validationSummary = that._renderSummary();\n }\n errorsList = parseHtml(that._summaryTemplate({ errors: errors }));\n summary.html(errorsList);\n summary.toggleClass('k-hidden', !errors.length);\n },\n hideValidationSummary: function () {\n var that = this, summary = that.validationSummary;\n if (!summary) {\n return;\n }\n summary.addClass('k-hidden');\n }\n });\n kendo.ui.plugin(Validator);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}