From 97798f11b90dc295c3ee5cc6faeec0e61a574973 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Tue, 8 Nov 2016 09:27:03 -0800 Subject: [PATCH] chore(all): prepare release 0.14.0 --- bower.json | 2 +- dist/amd/implementation/rules.d.ts | 2 +- .../implementation/standard-validator.d.ts | 13 +++-- dist/amd/implementation/standard-validator.js | 52 +++++++++++------- .../amd/implementation/validation-parser.d.ts | 4 +- dist/amd/implementation/validation-parser.js | 26 ++++----- dist/amd/implementation/validation-rules.d.ts | 6 ++- dist/amd/implementation/validation-rules.js | 12 +++-- dist/amd/property-info.d.ts | 4 +- dist/amd/property-info.js | 15 +++--- dist/amd/validate-binding-behavior-base.d.ts | 10 ++-- dist/amd/validate-binding-behavior-base.js | 18 +++++-- dist/amd/validate-trigger.d.ts | 4 +- dist/amd/validate-trigger.js | 18 +++---- dist/amd/validation-controller.d.ts | 11 ++-- dist/amd/validation-controller.js | 54 +++++++++++++------ .../amd/validation-errors-custom-attribute.js | 2 + dist/amd/validator.d.ts | 6 +++ dist/commonjs/implementation/rules.d.ts | 2 +- .../implementation/standard-validator.d.ts | 13 +++-- .../implementation/standard-validator.js | 52 +++++++++++------- .../implementation/validation-parser.d.ts | 4 +- .../implementation/validation-parser.js | 26 ++++----- .../implementation/validation-rules.d.ts | 6 ++- .../implementation/validation-rules.js | 12 +++-- dist/commonjs/property-info.d.ts | 4 +- dist/commonjs/property-info.js | 15 +++--- .../validate-binding-behavior-base.d.ts | 10 ++-- .../validate-binding-behavior-base.js | 18 +++++-- dist/commonjs/validate-trigger.d.ts | 4 +- dist/commonjs/validate-trigger.js | 18 +++---- dist/commonjs/validation-controller.d.ts | 11 ++-- dist/commonjs/validation-controller.js | 54 +++++++++++++------ .../validation-errors-custom-attribute.js | 2 + dist/commonjs/validator.d.ts | 6 +++ dist/es2015/implementation/rules.d.ts | 2 +- .../implementation/standard-validator.d.ts | 13 +++-- .../implementation/standard-validator.js | 52 +++++++++++------- .../implementation/validation-parser.d.ts | 4 +- .../implementation/validation-parser.js | 26 ++++----- .../implementation/validation-rules.d.ts | 6 ++- .../es2015/implementation/validation-rules.js | 12 +++-- dist/es2015/property-info.d.ts | 4 +- dist/es2015/property-info.js | 15 +++--- .../validate-binding-behavior-base.d.ts | 10 ++-- dist/es2015/validate-binding-behavior-base.js | 18 +++++-- dist/es2015/validate-trigger.d.ts | 4 +- dist/es2015/validate-trigger.js | 18 +++---- dist/es2015/validation-controller.d.ts | 11 ++-- dist/es2015/validation-controller.js | 53 ++++++++++++------ .../validation-errors-custom-attribute.js | 4 +- dist/es2015/validator.d.ts | 6 +++ dist/native-modules/implementation/rules.d.ts | 2 +- .../implementation/standard-validator.d.ts | 13 +++-- .../implementation/standard-validator.js | 52 +++++++++++------- .../implementation/validation-parser.d.ts | 4 +- .../implementation/validation-parser.js | 26 ++++----- .../implementation/validation-rules.d.ts | 6 ++- .../implementation/validation-rules.js | 12 +++-- dist/native-modules/property-info.d.ts | 4 +- dist/native-modules/property-info.js | 15 +++--- .../validate-binding-behavior-base.d.ts | 10 ++-- .../validate-binding-behavior-base.js | 18 +++++-- dist/native-modules/validate-trigger.d.ts | 4 +- dist/native-modules/validate-trigger.js | 18 +++---- .../native-modules/validation-controller.d.ts | 11 ++-- dist/native-modules/validation-controller.js | 54 +++++++++++++------ .../validation-errors-custom-attribute.js | 2 + dist/native-modules/validator.d.ts | 6 +++ dist/system/implementation/rules.d.ts | 2 +- .../implementation/standard-validator.d.ts | 13 +++-- .../implementation/standard-validator.js | 52 +++++++++++------- .../implementation/validation-parser.d.ts | 4 +- .../implementation/validation-parser.js | 26 ++++----- .../implementation/validation-rules.d.ts | 6 ++- .../system/implementation/validation-rules.js | 12 +++-- dist/system/property-info.d.ts | 4 +- dist/system/property-info.js | 15 +++--- .../validate-binding-behavior-base.d.ts | 10 ++-- dist/system/validate-binding-behavior-base.js | 18 +++++-- dist/system/validate-trigger.d.ts | 4 +- dist/system/validate-trigger.js | 18 +++---- dist/system/validation-controller.d.ts | 11 ++-- dist/system/validation-controller.js | 54 +++++++++++++------ .../validation-errors-custom-attribute.js | 2 + dist/system/validator.d.ts | 6 +++ doc/api.json | 2 +- package.json | 2 +- 88 files changed, 808 insertions(+), 484 deletions(-) diff --git a/bower.json b/bower.json index 72c6828b..f5977018 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-validation", - "version": "0.13.1", + "version": "0.14.0", "description": "Validation for Aurelia applications", "keywords": [ "aurelia", diff --git a/dist/amd/implementation/rules.d.ts b/dist/amd/implementation/rules.d.ts index 71c46daf..30947f6f 100644 --- a/dist/amd/implementation/rules.d.ts +++ b/dist/amd/implementation/rules.d.ts @@ -6,7 +6,7 @@ export declare class Rules { /** * The name of the property that stores the rules. */ - static key: string; + private static key; /** * Applies the rules to a target. */ diff --git a/dist/amd/implementation/standard-validator.d.ts b/dist/amd/implementation/standard-validator.d.ts index e05e7b8e..dfe55f31 100644 --- a/dist/amd/implementation/standard-validator.d.ts +++ b/dist/amd/implementation/standard-validator.d.ts @@ -1,6 +1,7 @@ import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidationError } from '../validation-error'; +import { Rule } from './rule'; import { ValidationMessageProvider } from './validation-messages'; /** * Validates. @@ -12,9 +13,6 @@ export declare class StandardValidator extends Validator { private lookupFunctions; private getDisplayName; constructor(messageProvider: ValidationMessageProvider, resources: ViewResources); - private getMessage(rule, object, value); - private validateRuleSequence(object, propertyName, ruleSequence, sequence); - private validate(object, propertyName, rules); /** * Validates the specified property. * @param object The object to validate. @@ -30,4 +28,13 @@ export declare class StandardValidator extends Validator { * for the object created by ValidationRules....on(class/object) */ validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + ruleExists(rules: Rule[][], rule: Rule): boolean; + private getMessage(rule, object, value); + private validateRuleSequence(object, propertyName, ruleSequence, sequence); + private validate(object, propertyName, rules); } diff --git a/dist/amd/implementation/standard-validator.js b/dist/amd/implementation/standard-validator.js index 89686019..96826407 100644 --- a/dist/amd/implementation/standard-validator.js +++ b/dist/amd/implementation/standard-validator.js @@ -17,6 +17,39 @@ define(["require", "exports", 'aurelia-templating', '../validator', '../validati this.lookupFunctions = resources.lookupFunctions; this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); } + /** + * Validates the specified property. + * @param object The object to validate. + * @param propertyName The name of the property to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { + return this.validate(object, propertyName, rules || null); + }; + /** + * Validates all rules for specified object and it's properties. + * @param object The object to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateObject = function (object, rules) { + return this.validate(object, null, rules || null); + }; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + StandardValidator.prototype.ruleExists = function (rules, rule) { + var i = rules.length; + while (i--) { + if (rules[i].indexOf(rule) !== -1) { + return true; + } + } + return false; + }; StandardValidator.prototype.getMessage = function (rule, object, value) { var expression = rule.message || this.messageProvider.getMessage(rule.messageKey); var _a = rule.property, propertyName = _a.name, displayName = _a.displayName; @@ -88,25 +121,6 @@ define(["require", "exports", 'aurelia-templating', '../validator', '../validati } return this.validateRuleSequence(object, propertyName, rules, 0); }; - /** - * Validates the specified property. - * @param object The object to validate. - * @param propertyName The name of the property to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { - return this.validate(object, propertyName, rules || null); - }; - /** - * Validates all rules for specified object and it's properties. - * @param object The object to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateObject = function (object, rules) { - return this.validate(object, null, rules || null); - }; StandardValidator.inject = [validation_messages_1.ValidationMessageProvider, aurelia_templating_1.ViewResources]; return StandardValidator; }(validator_1.Validator)); diff --git a/dist/amd/implementation/validation-parser.d.ts b/dist/amd/implementation/validation-parser.d.ts index 43f09ca5..75b2c7af 100644 --- a/dist/amd/implementation/validation-parser.d.ts +++ b/dist/amd/implementation/validation-parser.d.ts @@ -13,10 +13,10 @@ export declare class ValidationParser { private undefinedExpression; private cache; constructor(parser: Parser, bindinqLanguage: BindingLanguage); - private coalesce(part); parseMessage(message: string): Expression; - private getAccessorExpression(fn); parseProperty(property: string | PropertyAccessor): RuleProperty; + private coalesce(part); + private getAccessorExpression(fn); } export declare class MessageExpressionValidator extends Unparser { private originalMessage; diff --git a/dist/amd/implementation/validation-parser.js b/dist/amd/implementation/validation-parser.js index 6b112f11..80203554 100644 --- a/dist/amd/implementation/validation-parser.js +++ b/dist/amd/implementation/validation-parser.js @@ -14,10 +14,6 @@ define(["require", "exports", 'aurelia-binding', 'aurelia-templating', './util', this.undefinedExpression = new aurelia_binding_1.LiteralPrimitive(undefined); this.cache = {}; } - ValidationParser.prototype.coalesce = function (part) { - // part === null || part === undefined ? '' : part - return new aurelia_binding_1.Conditional(new aurelia_binding_1.Binary('||', new aurelia_binding_1.Binary('===', part, this.nullExpression), new aurelia_binding_1.Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new aurelia_binding_1.CallMember(part, 'toString', [])); - }; ValidationParser.prototype.parseMessage = function (message) { if (this.cache[message] !== undefined) { return this.cache[message]; @@ -34,15 +30,6 @@ define(["require", "exports", 'aurelia-binding', 'aurelia-templating', './util', this.cache[message] = expression; return expression; }; - ValidationParser.prototype.getAccessorExpression = function (fn) { - var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; - var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; - var match = classic.exec(fn) || arrow.exec(fn); - if (match === null) { - throw new Error("Unable to parse accessor function:\n" + fn); - } - return this.parser.parse(match[1]); - }; ValidationParser.prototype.parseProperty = function (property) { if (util_1.isString(property)) { return { name: property, displayName: null }; @@ -57,6 +44,19 @@ define(["require", "exports", 'aurelia-binding', 'aurelia-templating', './util', } throw new Error("Invalid subject: \"" + accessor + "\""); }; + ValidationParser.prototype.coalesce = function (part) { + // part === null || part === undefined ? '' : part + return new aurelia_binding_1.Conditional(new aurelia_binding_1.Binary('||', new aurelia_binding_1.Binary('===', part, this.nullExpression), new aurelia_binding_1.Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new aurelia_binding_1.CallMember(part, 'toString', [])); + }; + ValidationParser.prototype.getAccessorExpression = function (fn) { + var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; + var arrow = /^\(?[$_\w\d]+\)?\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; + var match = classic.exec(fn) || arrow.exec(fn); + if (match === null) { + throw new Error("Unable to parse accessor function:\n" + fn); + } + return this.parser.parse(match[1]); + }; ValidationParser.inject = [aurelia_binding_1.Parser, aurelia_templating_1.BindingLanguage]; return ValidationParser; }()); diff --git a/dist/amd/implementation/validation-rules.d.ts b/dist/amd/implementation/validation-rules.d.ts index 1bd93972..59ba7410 100644 --- a/dist/amd/implementation/validation-rules.d.ts +++ b/dist/amd/implementation/validation-rules.d.ts @@ -195,7 +195,8 @@ export declare class FluentEnsure { constructor(parser: ValidationParser); /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ ensure(property: string | PropertyAccessor): FluentRules; /** @@ -233,7 +234,8 @@ export declare class ValidationRules { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ static customRule(name: string, condition: (value: any, object?: any, ...args: any[]) => boolean | Promise, message: string, argsToConfig?: (...args: any[]) => any): void; /** diff --git a/dist/amd/implementation/validation-rules.js b/dist/amd/implementation/validation-rules.js index 8829a8b5..75d98847 100644 --- a/dist/amd/implementation/validation-rules.js +++ b/dist/amd/implementation/validation-rules.js @@ -250,7 +250,9 @@ define(["require", "exports", './util', './rules', './validation-messages'], fun * null, undefined and empty-string values are considered valid. */ FluentRules.prototype.email = function () { - return this.matches(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i) + // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address + /* tslint:disable:max-line-length */ + return this.matches(/^[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])?)*$/) .withMessageKey('email'); }; /** @@ -301,17 +303,20 @@ define(["require", "exports", './util', './rules', './validation-messages'], fun * Part of the fluent rule API. Enables targeting properties and objects with rules. */ var FluentEnsure = (function () { + /* tslint:enable */ function FluentEnsure(parser) { this.parser = parser; /** * Rules that have been defined using the fluent API. */ this.rules = []; + /* tslint:disable */ this._sequence = 0; } /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ FluentEnsure.prototype.ensure = function (property) { this.assertInitialized(); @@ -377,7 +382,8 @@ define(["require", "exports", './util', './rules', './validation-messages'], fun * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ ValidationRules.customRule = function (name, condition, message, argsToConfig) { validation_messages_1.validationMessages[name] = message; diff --git a/dist/amd/property-info.d.ts b/dist/amd/property-info.d.ts index ea68d9a0..59b760bf 100644 --- a/dist/amd/property-info.d.ts +++ b/dist/amd/property-info.d.ts @@ -5,6 +5,6 @@ import { Expression } from 'aurelia-binding'; * @param source The scope */ export declare function getPropertyInfo(expression: Expression, source: any): { - object: any; + object: Object; propertyName: string; -}; +} | null; diff --git a/dist/amd/property-info.js b/dist/amd/property-info.js index 911ae7a1..85cbe2ed 100644 --- a/dist/amd/property-info.js +++ b/dist/amd/property-info.js @@ -2,16 +2,12 @@ define(["require", "exports", 'aurelia-binding'], function (require, exports, au "use strict"; function getObject(expression, objectExpression, source) { var value = objectExpression.evaluate(source, null); - if (value !== null && (typeof value === 'object' || typeof value === 'function')) { + if (value === null || value === undefined || value instanceof Object) { return value; } - if (value === null) { - value = 'null'; - } - else if (value === undefined) { - value = 'undefined'; - } - throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object."); + /* tslint:disable */ + throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object, null or undefined."); + /* tslint:enable */ } /** * Retrieves the object and property name for the specified expression. @@ -40,6 +36,9 @@ define(["require", "exports", 'aurelia-binding'], function (require, exports, au else { throw new Error("Expression '" + originalExpression + "' is not compatible with the validate binding-behavior."); } + if (object === null || object === undefined) { + return null; + } return { object: object, propertyName: propertyName }; } exports.getPropertyInfo = getPropertyInfo; diff --git a/dist/amd/validate-binding-behavior-base.d.ts b/dist/amd/validate-binding-behavior-base.d.ts index cb4eb912..09c18430 100644 --- a/dist/amd/validate-binding-behavior-base.d.ts +++ b/dist/amd/validate-binding-behavior-base.d.ts @@ -8,11 +8,11 @@ export declare abstract class ValidateBindingBehaviorBase { constructor(taskQueue: TaskQueue); protected abstract getValidateTrigger(controller: ValidationController): number; /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ getTarget(binding: any, view: any): any; bind(binding: any, source: any, rulesOrController?: ValidationController | any, rules?: any): void; unbind(binding: any): void; diff --git a/dist/amd/validate-binding-behavior-base.js b/dist/amd/validate-binding-behavior-base.js index b50129ba..9ecc7469 100644 --- a/dist/amd/validate-binding-behavior-base.js +++ b/dist/amd/validate-binding-behavior-base.js @@ -8,11 +8,11 @@ define(["require", "exports", 'aurelia-dependency-injection', 'aurelia-pal', './ this.taskQueue = taskQueue; } /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ ValidateBindingBehaviorBase.prototype.getTarget = function (binding, view) { var target = binding.target; // DOM element @@ -51,14 +51,20 @@ define(["require", "exports", 'aurelia-dependency-injection', 'aurelia-pal', './ controller.registerBinding(binding, target, rules); binding.validationController = controller; var trigger = this.getValidateTrigger(controller); + /* tslint:disable:no-bitwise */ if (trigger & validate_trigger_1.validateTrigger.change) { + /* tslint:enable:no-bitwise */ binding.standardUpdateSource = binding.updateSource; + /* tslint:disable:only-arrow-functions */ binding.updateSource = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateSource(value); this.validationController.validateBinding(this); }; } + /* tslint:disable:no-bitwise */ if (trigger & validate_trigger_1.validateTrigger.blur) { + /* tslint:enable:no-bitwise */ binding.validateBlurHandler = function () { _this.taskQueue.queueMicroTask(function () { return controller.validateBinding(binding); }); }; @@ -67,7 +73,9 @@ define(["require", "exports", 'aurelia-dependency-injection', 'aurelia-pal', './ } if (trigger !== validate_trigger_1.validateTrigger.manual) { binding.standardUpdateTarget = binding.updateTarget; + /* tslint:disable:only-arrow-functions */ binding.updateTarget = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateTarget(value); this.validationController.resetBinding(this); }; diff --git a/dist/amd/validate-trigger.d.ts b/dist/amd/validate-trigger.d.ts index e001bfa3..82c60096 100644 --- a/dist/amd/validate-trigger.d.ts +++ b/dist/amd/validate-trigger.d.ts @@ -1,6 +1,6 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export declare const validateTrigger: { manual: number; blur: number; diff --git a/dist/amd/validate-trigger.js b/dist/amd/validate-trigger.js index 2c1a1b0e..c14d4ea7 100644 --- a/dist/amd/validate-trigger.js +++ b/dist/amd/validate-trigger.js @@ -1,21 +1,21 @@ define(["require", "exports"], function (require, exports) { "use strict"; /** - * Validation triggers. - */ + * Validation triggers. + */ exports.validateTrigger = { /** - * Manual validation. Use the controller's `validate()` and `reset()` methods - * to validate all bindings. - */ + * Manual validation. Use the controller's `validate()` and `reset()` methods + * to validate all bindings. + */ manual: 0, /** - * Validate the binding when the binding's target element fires a DOM "blur" event. - */ + * Validate the binding when the binding's target element fires a DOM "blur" event. + */ blur: 1, /** - * Validate the binding when it updates the model due to a change in the view. - */ + * Validate the binding when it updates the model due to a change in the view. + */ change: 2, /** * Validate the binding when the binding's target element fires a DOM "blur" event and diff --git a/dist/amd/validation-controller.d.ts b/dist/amd/validation-controller.d.ts index dcc1c174..a65621f3 100644 --- a/dist/amd/validation-controller.d.ts +++ b/dist/amd/validation-controller.d.ts @@ -90,7 +90,8 @@ export declare class ValidationController { private getInstructionPredicate(instruction?); /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ validate(instruction?: ValidateInstruction): Promise; /** @@ -104,11 +105,11 @@ export declare class ValidationController { private getAssociatedElements({object, propertyName}); private processErrorDelta(kind, oldErrors, newErrors); /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ validateBinding(binding: Binding): void; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ resetBinding(binding: Binding): void; } diff --git a/dist/amd/validation-controller.js b/dist/amd/validation-controller.js index a950fc56..26fcd248 100644 --- a/dist/amd/validation-controller.js +++ b/dist/amd/validation-controller.js @@ -96,7 +96,7 @@ define(["require", "exports", './validator', './validate-trigger', './property-i * @param rules (optional) rules associated with the binding. Validator implementation specific. */ ValidationController.prototype.registerBinding = function (binding, target, rules) { - this.bindings.set(binding, { target: target, rules: rules }); + this.bindings.set(binding, { target: target, rules: rules, propertyInfo: null }); }; /** * Unregisters a binding with the controller. @@ -111,6 +111,7 @@ define(["require", "exports", './validator', './validate-trigger', './property-i * relevant errors in the list of rendered errors. */ ValidationController.prototype.getInstructionPredicate = function (instruction) { + var _this = this; if (instruction) { var object_1 = instruction.object, propertyName_1 = instruction.propertyName, rules_1 = instruction.rules; var predicate_1; @@ -120,9 +121,8 @@ define(["require", "exports", './validator', './validate-trigger', './property-i else { predicate_1 = function (x) { return x.object === object_1; }; } - // todo: move to Validator interface: - if (rules_1 && rules_1.indexOf) { - return function (x) { return predicate_1(x) && rules_1.indexOf(x.rule) !== -1; }; + if (rules_1) { + return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); }; } return predicate_1; } @@ -132,7 +132,8 @@ define(["require", "exports", './validator', './validate-trigger', './property-i }; /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ ValidationController.prototype.validate = function (instruction) { var _this = this; @@ -162,11 +163,11 @@ define(["require", "exports", './validator', './validate-trigger', './property-i } for (var _c = 0, _d = Array.from(_this.bindings); _c < _d.length; _c++) { var _e = _d[_c], binding = _e[0], rules = _e[1].rules; - var _f = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _f.object, propertyName = _f.propertyName; - if (_this.objects.has(object)) { + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || _this.objects.has(propertyInfo.object)) { continue; } - promises.push(_this.validator.validateProperty(object, propertyName, rules)); + promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); } return Promise.all(promises).then(function (errorSets) { return errorSets.reduce(function (a, b) { return a.concat(b); }, []); }); }; @@ -210,8 +211,8 @@ define(["require", "exports", './validator', './validate-trigger', './property-i var elements = []; for (var _i = 0, _b = Array.from(this.bindings); _i < _b.length; _i++) { var _c = _b[_i], binding = _c[0], target = _c[1].target; - var _d = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), o = _d.object, p = _d.propertyName; - if (o === object && p === propertyName) { + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { elements.push(target); } } @@ -273,22 +274,41 @@ define(["require", "exports", './validator', './validate-trigger', './property-i } }; /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ ValidationController.prototype.validateBinding = function (binding) { if (!binding.isBound) { return; } - var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + var rules = undefined; var registeredBinding = this.bindings.get(binding); - var rules = registeredBinding ? registeredBinding.rules : undefined; + if (registeredBinding) { + rules = registeredBinding.rules; + registeredBinding.propertyInfo = propertyInfo; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.validate({ object: object, propertyName: propertyName, rules: rules }); }; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ ValidationController.prototype.resetBinding = function (binding) { - var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var registeredBinding = this.bindings.get(binding); + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo && registeredBinding) { + propertyInfo = registeredBinding.propertyInfo; + } + if (registeredBinding) { + registeredBinding.propertyInfo = null; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.reset({ object: object, propertyName: propertyName }); }; ValidationController.inject = [validator_1.Validator]; diff --git a/dist/amd/validation-errors-custom-attribute.js b/dist/amd/validation-errors-custom-attribute.js index 2834d01f..9f38186b 100644 --- a/dist/amd/validation-errors-custom-attribute.js +++ b/dist/amd/validation-errors-custom-attribute.js @@ -17,7 +17,9 @@ define(["require", "exports", 'aurelia-binding', 'aurelia-dependency-injection', if (a.targets[0] === b.targets[0]) { return 0; } + /* tslint:disable:no-bitwise */ return a.targets[0].compareDocumentPosition(b.targets[0]) & 2 ? 1 : -1; + /* tslint:enable:no-bitwise */ }); }; ValidationErrorsCustomAttribute.prototype.interestingElements = function (elements) { diff --git a/dist/amd/validator.d.ts b/dist/amd/validator.d.ts index 104dc3a1..edaa3f40 100644 --- a/dist/amd/validator.d.ts +++ b/dist/amd/validator.d.ts @@ -19,4 +19,10 @@ export declare abstract class Validator { * specified object. This may not be possible for all implementations of this interface. */ abstract validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + abstract ruleExists(rules: any, rule: any): boolean; } diff --git a/dist/commonjs/implementation/rules.d.ts b/dist/commonjs/implementation/rules.d.ts index 71c46daf..30947f6f 100644 --- a/dist/commonjs/implementation/rules.d.ts +++ b/dist/commonjs/implementation/rules.d.ts @@ -6,7 +6,7 @@ export declare class Rules { /** * The name of the property that stores the rules. */ - static key: string; + private static key; /** * Applies the rules to a target. */ diff --git a/dist/commonjs/implementation/standard-validator.d.ts b/dist/commonjs/implementation/standard-validator.d.ts index e05e7b8e..dfe55f31 100644 --- a/dist/commonjs/implementation/standard-validator.d.ts +++ b/dist/commonjs/implementation/standard-validator.d.ts @@ -1,6 +1,7 @@ import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidationError } from '../validation-error'; +import { Rule } from './rule'; import { ValidationMessageProvider } from './validation-messages'; /** * Validates. @@ -12,9 +13,6 @@ export declare class StandardValidator extends Validator { private lookupFunctions; private getDisplayName; constructor(messageProvider: ValidationMessageProvider, resources: ViewResources); - private getMessage(rule, object, value); - private validateRuleSequence(object, propertyName, ruleSequence, sequence); - private validate(object, propertyName, rules); /** * Validates the specified property. * @param object The object to validate. @@ -30,4 +28,13 @@ export declare class StandardValidator extends Validator { * for the object created by ValidationRules....on(class/object) */ validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + ruleExists(rules: Rule[][], rule: Rule): boolean; + private getMessage(rule, object, value); + private validateRuleSequence(object, propertyName, ruleSequence, sequence); + private validate(object, propertyName, rules); } diff --git a/dist/commonjs/implementation/standard-validator.js b/dist/commonjs/implementation/standard-validator.js index 82314d0d..ba08aa86 100644 --- a/dist/commonjs/implementation/standard-validator.js +++ b/dist/commonjs/implementation/standard-validator.js @@ -21,6 +21,39 @@ var StandardValidator = (function (_super) { this.lookupFunctions = resources.lookupFunctions; this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); } + /** + * Validates the specified property. + * @param object The object to validate. + * @param propertyName The name of the property to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { + return this.validate(object, propertyName, rules || null); + }; + /** + * Validates all rules for specified object and it's properties. + * @param object The object to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateObject = function (object, rules) { + return this.validate(object, null, rules || null); + }; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + StandardValidator.prototype.ruleExists = function (rules, rule) { + var i = rules.length; + while (i--) { + if (rules[i].indexOf(rule) !== -1) { + return true; + } + } + return false; + }; StandardValidator.prototype.getMessage = function (rule, object, value) { var expression = rule.message || this.messageProvider.getMessage(rule.messageKey); var _a = rule.property, propertyName = _a.name, displayName = _a.displayName; @@ -92,25 +125,6 @@ var StandardValidator = (function (_super) { } return this.validateRuleSequence(object, propertyName, rules, 0); }; - /** - * Validates the specified property. - * @param object The object to validate. - * @param propertyName The name of the property to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { - return this.validate(object, propertyName, rules || null); - }; - /** - * Validates all rules for specified object and it's properties. - * @param object The object to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateObject = function (object, rules) { - return this.validate(object, null, rules || null); - }; StandardValidator.inject = [validation_messages_1.ValidationMessageProvider, aurelia_templating_1.ViewResources]; return StandardValidator; }(validator_1.Validator)); diff --git a/dist/commonjs/implementation/validation-parser.d.ts b/dist/commonjs/implementation/validation-parser.d.ts index 43f09ca5..75b2c7af 100644 --- a/dist/commonjs/implementation/validation-parser.d.ts +++ b/dist/commonjs/implementation/validation-parser.d.ts @@ -13,10 +13,10 @@ export declare class ValidationParser { private undefinedExpression; private cache; constructor(parser: Parser, bindinqLanguage: BindingLanguage); - private coalesce(part); parseMessage(message: string): Expression; - private getAccessorExpression(fn); parseProperty(property: string | PropertyAccessor): RuleProperty; + private coalesce(part); + private getAccessorExpression(fn); } export declare class MessageExpressionValidator extends Unparser { private originalMessage; diff --git a/dist/commonjs/implementation/validation-parser.js b/dist/commonjs/implementation/validation-parser.js index 67c6b45b..dc6801d6 100644 --- a/dist/commonjs/implementation/validation-parser.js +++ b/dist/commonjs/implementation/validation-parser.js @@ -17,10 +17,6 @@ var ValidationParser = (function () { this.undefinedExpression = new aurelia_binding_1.LiteralPrimitive(undefined); this.cache = {}; } - ValidationParser.prototype.coalesce = function (part) { - // part === null || part === undefined ? '' : part - return new aurelia_binding_1.Conditional(new aurelia_binding_1.Binary('||', new aurelia_binding_1.Binary('===', part, this.nullExpression), new aurelia_binding_1.Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new aurelia_binding_1.CallMember(part, 'toString', [])); - }; ValidationParser.prototype.parseMessage = function (message) { if (this.cache[message] !== undefined) { return this.cache[message]; @@ -37,15 +33,6 @@ var ValidationParser = (function () { this.cache[message] = expression; return expression; }; - ValidationParser.prototype.getAccessorExpression = function (fn) { - var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; - var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; - var match = classic.exec(fn) || arrow.exec(fn); - if (match === null) { - throw new Error("Unable to parse accessor function:\n" + fn); - } - return this.parser.parse(match[1]); - }; ValidationParser.prototype.parseProperty = function (property) { if (util_1.isString(property)) { return { name: property, displayName: null }; @@ -60,6 +47,19 @@ var ValidationParser = (function () { } throw new Error("Invalid subject: \"" + accessor + "\""); }; + ValidationParser.prototype.coalesce = function (part) { + // part === null || part === undefined ? '' : part + return new aurelia_binding_1.Conditional(new aurelia_binding_1.Binary('||', new aurelia_binding_1.Binary('===', part, this.nullExpression), new aurelia_binding_1.Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new aurelia_binding_1.CallMember(part, 'toString', [])); + }; + ValidationParser.prototype.getAccessorExpression = function (fn) { + var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; + var arrow = /^\(?[$_\w\d]+\)?\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; + var match = classic.exec(fn) || arrow.exec(fn); + if (match === null) { + throw new Error("Unable to parse accessor function:\n" + fn); + } + return this.parser.parse(match[1]); + }; ValidationParser.inject = [aurelia_binding_1.Parser, aurelia_templating_1.BindingLanguage]; return ValidationParser; }()); diff --git a/dist/commonjs/implementation/validation-rules.d.ts b/dist/commonjs/implementation/validation-rules.d.ts index 1bd93972..59ba7410 100644 --- a/dist/commonjs/implementation/validation-rules.d.ts +++ b/dist/commonjs/implementation/validation-rules.d.ts @@ -195,7 +195,8 @@ export declare class FluentEnsure { constructor(parser: ValidationParser); /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ ensure(property: string | PropertyAccessor): FluentRules; /** @@ -233,7 +234,8 @@ export declare class ValidationRules { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ static customRule(name: string, condition: (value: any, object?: any, ...args: any[]) => boolean | Promise, message: string, argsToConfig?: (...args: any[]) => any): void; /** diff --git a/dist/commonjs/implementation/validation-rules.js b/dist/commonjs/implementation/validation-rules.js index d6291c4b..2726596e 100644 --- a/dist/commonjs/implementation/validation-rules.js +++ b/dist/commonjs/implementation/validation-rules.js @@ -252,7 +252,9 @@ var FluentRules = (function () { * null, undefined and empty-string values are considered valid. */ FluentRules.prototype.email = function () { - return this.matches(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i) + // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address + /* tslint:disable:max-line-length */ + return this.matches(/^[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])?)*$/) .withMessageKey('email'); }; /** @@ -303,17 +305,20 @@ exports.FluentRules = FluentRules; * Part of the fluent rule API. Enables targeting properties and objects with rules. */ var FluentEnsure = (function () { + /* tslint:enable */ function FluentEnsure(parser) { this.parser = parser; /** * Rules that have been defined using the fluent API. */ this.rules = []; + /* tslint:disable */ this._sequence = 0; } /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ FluentEnsure.prototype.ensure = function (property) { this.assertInitialized(); @@ -379,7 +384,8 @@ var ValidationRules = (function () { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ ValidationRules.customRule = function (name, condition, message, argsToConfig) { validation_messages_1.validationMessages[name] = message; diff --git a/dist/commonjs/property-info.d.ts b/dist/commonjs/property-info.d.ts index ea68d9a0..59b760bf 100644 --- a/dist/commonjs/property-info.d.ts +++ b/dist/commonjs/property-info.d.ts @@ -5,6 +5,6 @@ import { Expression } from 'aurelia-binding'; * @param source The scope */ export declare function getPropertyInfo(expression: Expression, source: any): { - object: any; + object: Object; propertyName: string; -}; +} | null; diff --git a/dist/commonjs/property-info.js b/dist/commonjs/property-info.js index 9a8030de..b639dbd3 100644 --- a/dist/commonjs/property-info.js +++ b/dist/commonjs/property-info.js @@ -2,16 +2,12 @@ var aurelia_binding_1 = require('aurelia-binding'); function getObject(expression, objectExpression, source) { var value = objectExpression.evaluate(source, null); - if (value !== null && (typeof value === 'object' || typeof value === 'function')) { + if (value === null || value === undefined || value instanceof Object) { return value; } - if (value === null) { - value = 'null'; - } - else if (value === undefined) { - value = 'undefined'; - } - throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object."); + /* tslint:disable */ + throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object, null or undefined."); + /* tslint:enable */ } /** * Retrieves the object and property name for the specified expression. @@ -40,6 +36,9 @@ function getPropertyInfo(expression, source) { else { throw new Error("Expression '" + originalExpression + "' is not compatible with the validate binding-behavior."); } + if (object === null || object === undefined) { + return null; + } return { object: object, propertyName: propertyName }; } exports.getPropertyInfo = getPropertyInfo; diff --git a/dist/commonjs/validate-binding-behavior-base.d.ts b/dist/commonjs/validate-binding-behavior-base.d.ts index cb4eb912..09c18430 100644 --- a/dist/commonjs/validate-binding-behavior-base.d.ts +++ b/dist/commonjs/validate-binding-behavior-base.d.ts @@ -8,11 +8,11 @@ export declare abstract class ValidateBindingBehaviorBase { constructor(taskQueue: TaskQueue); protected abstract getValidateTrigger(controller: ValidationController): number; /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ getTarget(binding: any, view: any): any; bind(binding: any, source: any, rulesOrController?: ValidationController | any, rules?: any): void; unbind(binding: any): void; diff --git a/dist/commonjs/validate-binding-behavior-base.js b/dist/commonjs/validate-binding-behavior-base.js index 6b8df181..b54e1aac 100644 --- a/dist/commonjs/validate-binding-behavior-base.js +++ b/dist/commonjs/validate-binding-behavior-base.js @@ -11,11 +11,11 @@ var ValidateBindingBehaviorBase = (function () { this.taskQueue = taskQueue; } /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ ValidateBindingBehaviorBase.prototype.getTarget = function (binding, view) { var target = binding.target; // DOM element @@ -54,14 +54,20 @@ var ValidateBindingBehaviorBase = (function () { controller.registerBinding(binding, target, rules); binding.validationController = controller; var trigger = this.getValidateTrigger(controller); + /* tslint:disable:no-bitwise */ if (trigger & validate_trigger_1.validateTrigger.change) { + /* tslint:enable:no-bitwise */ binding.standardUpdateSource = binding.updateSource; + /* tslint:disable:only-arrow-functions */ binding.updateSource = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateSource(value); this.validationController.validateBinding(this); }; } + /* tslint:disable:no-bitwise */ if (trigger & validate_trigger_1.validateTrigger.blur) { + /* tslint:enable:no-bitwise */ binding.validateBlurHandler = function () { _this.taskQueue.queueMicroTask(function () { return controller.validateBinding(binding); }); }; @@ -70,7 +76,9 @@ var ValidateBindingBehaviorBase = (function () { } if (trigger !== validate_trigger_1.validateTrigger.manual) { binding.standardUpdateTarget = binding.updateTarget; + /* tslint:disable:only-arrow-functions */ binding.updateTarget = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateTarget(value); this.validationController.resetBinding(this); }; diff --git a/dist/commonjs/validate-trigger.d.ts b/dist/commonjs/validate-trigger.d.ts index e001bfa3..82c60096 100644 --- a/dist/commonjs/validate-trigger.d.ts +++ b/dist/commonjs/validate-trigger.d.ts @@ -1,6 +1,6 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export declare const validateTrigger: { manual: number; blur: number; diff --git a/dist/commonjs/validate-trigger.js b/dist/commonjs/validate-trigger.js index 5cf0cf1c..1d18fc8f 100644 --- a/dist/commonjs/validate-trigger.js +++ b/dist/commonjs/validate-trigger.js @@ -1,20 +1,20 @@ "use strict"; /** -* Validation triggers. -*/ + * Validation triggers. + */ exports.validateTrigger = { /** - * Manual validation. Use the controller's `validate()` and `reset()` methods - * to validate all bindings. - */ + * Manual validation. Use the controller's `validate()` and `reset()` methods + * to validate all bindings. + */ manual: 0, /** - * Validate the binding when the binding's target element fires a DOM "blur" event. - */ + * Validate the binding when the binding's target element fires a DOM "blur" event. + */ blur: 1, /** - * Validate the binding when it updates the model due to a change in the view. - */ + * Validate the binding when it updates the model due to a change in the view. + */ change: 2, /** * Validate the binding when the binding's target element fires a DOM "blur" event and diff --git a/dist/commonjs/validation-controller.d.ts b/dist/commonjs/validation-controller.d.ts index dcc1c174..a65621f3 100644 --- a/dist/commonjs/validation-controller.d.ts +++ b/dist/commonjs/validation-controller.d.ts @@ -90,7 +90,8 @@ export declare class ValidationController { private getInstructionPredicate(instruction?); /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ validate(instruction?: ValidateInstruction): Promise; /** @@ -104,11 +105,11 @@ export declare class ValidationController { private getAssociatedElements({object, propertyName}); private processErrorDelta(kind, oldErrors, newErrors); /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ validateBinding(binding: Binding): void; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ resetBinding(binding: Binding): void; } diff --git a/dist/commonjs/validation-controller.js b/dist/commonjs/validation-controller.js index a85eeb6e..461e099b 100644 --- a/dist/commonjs/validation-controller.js +++ b/dist/commonjs/validation-controller.js @@ -99,7 +99,7 @@ var ValidationController = (function () { * @param rules (optional) rules associated with the binding. Validator implementation specific. */ ValidationController.prototype.registerBinding = function (binding, target, rules) { - this.bindings.set(binding, { target: target, rules: rules }); + this.bindings.set(binding, { target: target, rules: rules, propertyInfo: null }); }; /** * Unregisters a binding with the controller. @@ -114,6 +114,7 @@ var ValidationController = (function () { * relevant errors in the list of rendered errors. */ ValidationController.prototype.getInstructionPredicate = function (instruction) { + var _this = this; if (instruction) { var object_1 = instruction.object, propertyName_1 = instruction.propertyName, rules_1 = instruction.rules; var predicate_1; @@ -123,9 +124,8 @@ var ValidationController = (function () { else { predicate_1 = function (x) { return x.object === object_1; }; } - // todo: move to Validator interface: - if (rules_1 && rules_1.indexOf) { - return function (x) { return predicate_1(x) && rules_1.indexOf(x.rule) !== -1; }; + if (rules_1) { + return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); }; } return predicate_1; } @@ -135,7 +135,8 @@ var ValidationController = (function () { }; /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ ValidationController.prototype.validate = function (instruction) { var _this = this; @@ -165,11 +166,11 @@ var ValidationController = (function () { } for (var _c = 0, _d = Array.from(_this.bindings); _c < _d.length; _c++) { var _e = _d[_c], binding = _e[0], rules = _e[1].rules; - var _f = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _f.object, propertyName = _f.propertyName; - if (_this.objects.has(object)) { + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || _this.objects.has(propertyInfo.object)) { continue; } - promises.push(_this.validator.validateProperty(object, propertyName, rules)); + promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); } return Promise.all(promises).then(function (errorSets) { return errorSets.reduce(function (a, b) { return a.concat(b); }, []); }); }; @@ -213,8 +214,8 @@ var ValidationController = (function () { var elements = []; for (var _i = 0, _b = Array.from(this.bindings); _i < _b.length; _i++) { var _c = _b[_i], binding = _c[0], target = _c[1].target; - var _d = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), o = _d.object, p = _d.propertyName; - if (o === object && p === propertyName) { + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { elements.push(target); } } @@ -276,22 +277,41 @@ var ValidationController = (function () { } }; /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ ValidationController.prototype.validateBinding = function (binding) { if (!binding.isBound) { return; } - var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + var rules = undefined; var registeredBinding = this.bindings.get(binding); - var rules = registeredBinding ? registeredBinding.rules : undefined; + if (registeredBinding) { + rules = registeredBinding.rules; + registeredBinding.propertyInfo = propertyInfo; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.validate({ object: object, propertyName: propertyName, rules: rules }); }; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ ValidationController.prototype.resetBinding = function (binding) { - var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var registeredBinding = this.bindings.get(binding); + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo && registeredBinding) { + propertyInfo = registeredBinding.propertyInfo; + } + if (registeredBinding) { + registeredBinding.propertyInfo = null; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.reset({ object: object, propertyName: propertyName }); }; ValidationController.inject = [validator_1.Validator]; diff --git a/dist/commonjs/validation-errors-custom-attribute.js b/dist/commonjs/validation-errors-custom-attribute.js index e3e538da..24098a40 100644 --- a/dist/commonjs/validation-errors-custom-attribute.js +++ b/dist/commonjs/validation-errors-custom-attribute.js @@ -20,7 +20,9 @@ var ValidationErrorsCustomAttribute = (function () { if (a.targets[0] === b.targets[0]) { return 0; } + /* tslint:disable:no-bitwise */ return a.targets[0].compareDocumentPosition(b.targets[0]) & 2 ? 1 : -1; + /* tslint:enable:no-bitwise */ }); }; ValidationErrorsCustomAttribute.prototype.interestingElements = function (elements) { diff --git a/dist/commonjs/validator.d.ts b/dist/commonjs/validator.d.ts index 104dc3a1..edaa3f40 100644 --- a/dist/commonjs/validator.d.ts +++ b/dist/commonjs/validator.d.ts @@ -19,4 +19,10 @@ export declare abstract class Validator { * specified object. This may not be possible for all implementations of this interface. */ abstract validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + abstract ruleExists(rules: any, rule: any): boolean; } diff --git a/dist/es2015/implementation/rules.d.ts b/dist/es2015/implementation/rules.d.ts index 71c46daf..30947f6f 100644 --- a/dist/es2015/implementation/rules.d.ts +++ b/dist/es2015/implementation/rules.d.ts @@ -6,7 +6,7 @@ export declare class Rules { /** * The name of the property that stores the rules. */ - static key: string; + private static key; /** * Applies the rules to a target. */ diff --git a/dist/es2015/implementation/standard-validator.d.ts b/dist/es2015/implementation/standard-validator.d.ts index e05e7b8e..dfe55f31 100644 --- a/dist/es2015/implementation/standard-validator.d.ts +++ b/dist/es2015/implementation/standard-validator.d.ts @@ -1,6 +1,7 @@ import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidationError } from '../validation-error'; +import { Rule } from './rule'; import { ValidationMessageProvider } from './validation-messages'; /** * Validates. @@ -12,9 +13,6 @@ export declare class StandardValidator extends Validator { private lookupFunctions; private getDisplayName; constructor(messageProvider: ValidationMessageProvider, resources: ViewResources); - private getMessage(rule, object, value); - private validateRuleSequence(object, propertyName, ruleSequence, sequence); - private validate(object, propertyName, rules); /** * Validates the specified property. * @param object The object to validate. @@ -30,4 +28,13 @@ export declare class StandardValidator extends Validator { * for the object created by ValidationRules....on(class/object) */ validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + ruleExists(rules: Rule[][], rule: Rule): boolean; + private getMessage(rule, object, value); + private validateRuleSequence(object, propertyName, ruleSequence, sequence); + private validate(object, propertyName, rules); } diff --git a/dist/es2015/implementation/standard-validator.js b/dist/es2015/implementation/standard-validator.js index f81057ec..99068cec 100644 --- a/dist/es2015/implementation/standard-validator.js +++ b/dist/es2015/implementation/standard-validator.js @@ -14,6 +14,39 @@ export class StandardValidator extends Validator { this.lookupFunctions = resources.lookupFunctions; this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); } + /** + * Validates the specified property. + * @param object The object to validate. + * @param propertyName The name of the property to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + validateProperty(object, propertyName, rules) { + return this.validate(object, propertyName, rules || null); + } + /** + * Validates all rules for specified object and it's properties. + * @param object The object to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + validateObject(object, rules) { + return this.validate(object, null, rules || null); + } + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + ruleExists(rules, rule) { + let i = rules.length; + while (i--) { + if (rules[i].indexOf(rule) !== -1) { + return true; + } + } + return false; + } getMessage(rule, object, value) { const expression = rule.message || this.messageProvider.getMessage(rule.messageKey); let { name: propertyName, displayName } = rule.property; @@ -81,24 +114,5 @@ export class StandardValidator extends Validator { } return this.validateRuleSequence(object, propertyName, rules, 0); } - /** - * Validates the specified property. - * @param object The object to validate. - * @param propertyName The name of the property to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - validateProperty(object, propertyName, rules) { - return this.validate(object, propertyName, rules || null); - } - /** - * Validates all rules for specified object and it's properties. - * @param object The object to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - validateObject(object, rules) { - return this.validate(object, null, rules || null); - } } StandardValidator.inject = [ValidationMessageProvider, ViewResources]; diff --git a/dist/es2015/implementation/validation-parser.d.ts b/dist/es2015/implementation/validation-parser.d.ts index 43f09ca5..75b2c7af 100644 --- a/dist/es2015/implementation/validation-parser.d.ts +++ b/dist/es2015/implementation/validation-parser.d.ts @@ -13,10 +13,10 @@ export declare class ValidationParser { private undefinedExpression; private cache; constructor(parser: Parser, bindinqLanguage: BindingLanguage); - private coalesce(part); parseMessage(message: string): Expression; - private getAccessorExpression(fn); parseProperty(property: string | PropertyAccessor): RuleProperty; + private coalesce(part); + private getAccessorExpression(fn); } export declare class MessageExpressionValidator extends Unparser { private originalMessage; diff --git a/dist/es2015/implementation/validation-parser.js b/dist/es2015/implementation/validation-parser.js index 96b0aeba..48666130 100644 --- a/dist/es2015/implementation/validation-parser.js +++ b/dist/es2015/implementation/validation-parser.js @@ -11,10 +11,6 @@ export class ValidationParser { this.undefinedExpression = new LiteralPrimitive(undefined); this.cache = {}; } - coalesce(part) { - // part === null || part === undefined ? '' : part - return new Conditional(new Binary('||', new Binary('===', part, this.nullExpression), new Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new CallMember(part, 'toString', [])); - } parseMessage(message) { if (this.cache[message] !== undefined) { return this.cache[message]; @@ -31,15 +27,6 @@ export class ValidationParser { this.cache[message] = expression; return expression; } - getAccessorExpression(fn) { - const classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; - const arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; - const match = classic.exec(fn) || arrow.exec(fn); - if (match === null) { - throw new Error(`Unable to parse accessor function:\n${fn}`); - } - return this.parser.parse(match[1]); - } parseProperty(property) { if (isString(property)) { return { name: property, displayName: null }; @@ -54,6 +41,19 @@ export class ValidationParser { } throw new Error(`Invalid subject: "${accessor}"`); } + coalesce(part) { + // part === null || part === undefined ? '' : part + return new Conditional(new Binary('||', new Binary('===', part, this.nullExpression), new Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new CallMember(part, 'toString', [])); + } + getAccessorExpression(fn) { + const classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; + const arrow = /^\(?[$_\w\d]+\)?\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; + const match = classic.exec(fn) || arrow.exec(fn); + if (match === null) { + throw new Error(`Unable to parse accessor function:\n${fn}`); + } + return this.parser.parse(match[1]); + } } ValidationParser.inject = [Parser, BindingLanguage]; export class MessageExpressionValidator extends Unparser { diff --git a/dist/es2015/implementation/validation-rules.d.ts b/dist/es2015/implementation/validation-rules.d.ts index 1bd93972..59ba7410 100644 --- a/dist/es2015/implementation/validation-rules.d.ts +++ b/dist/es2015/implementation/validation-rules.d.ts @@ -195,7 +195,8 @@ export declare class FluentEnsure { constructor(parser: ValidationParser); /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ ensure(property: string | PropertyAccessor): FluentRules; /** @@ -233,7 +234,8 @@ export declare class ValidationRules { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ static customRule(name: string, condition: (value: any, object?: any, ...args: any[]) => boolean | Promise, message: string, argsToConfig?: (...args: any[]) => any): void; /** diff --git a/dist/es2015/implementation/validation-rules.js b/dist/es2015/implementation/validation-rules.js index d38e5cbb..88f87df4 100644 --- a/dist/es2015/implementation/validation-rules.js +++ b/dist/es2015/implementation/validation-rules.js @@ -232,7 +232,9 @@ export class FluentRules { * null, undefined and empty-string values are considered valid. */ email() { - return this.matches(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i) + // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address + /* tslint:disable:max-line-length */ + return this.matches(/^[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])?)*$/) .withMessageKey('email'); } /** @@ -281,17 +283,20 @@ FluentRules.customRules = {}; * Part of the fluent rule API. Enables targeting properties and objects with rules. */ export class FluentEnsure { + /* tslint:enable */ constructor(parser) { this.parser = parser; /** * Rules that have been defined using the fluent API. */ this.rules = []; + /* tslint:disable */ this._sequence = 0; } /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ ensure(property) { this.assertInitialized(); @@ -353,7 +358,8 @@ export class ValidationRules { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ static customRule(name, condition, message, argsToConfig) { validationMessages[name] = message; diff --git a/dist/es2015/property-info.d.ts b/dist/es2015/property-info.d.ts index ea68d9a0..59b760bf 100644 --- a/dist/es2015/property-info.d.ts +++ b/dist/es2015/property-info.d.ts @@ -5,6 +5,6 @@ import { Expression } from 'aurelia-binding'; * @param source The scope */ export declare function getPropertyInfo(expression: Expression, source: any): { - object: any; + object: Object; propertyName: string; -}; +} | null; diff --git a/dist/es2015/property-info.js b/dist/es2015/property-info.js index 19d445b9..60963a5f 100644 --- a/dist/es2015/property-info.js +++ b/dist/es2015/property-info.js @@ -1,16 +1,12 @@ import { AccessMember, AccessScope, AccessKeyed, BindingBehavior, ValueConverter } from 'aurelia-binding'; function getObject(expression, objectExpression, source) { let value = objectExpression.evaluate(source, null); - if (value !== null && (typeof value === 'object' || typeof value === 'function')) { + if (value === null || value === undefined || value instanceof Object) { return value; } - if (value === null) { - value = 'null'; - } - else if (value === undefined) { - value = 'undefined'; - } - throw new Error(`The '${objectExpression}' part of '${expression}' evaluates to ${value} instead of an object.`); + /* tslint:disable */ + throw new Error(`The '${objectExpression}' part of '${expression}' evaluates to ${value} instead of an object, null or undefined.`); + /* tslint:enable */ } /** * Retrieves the object and property name for the specified expression. @@ -39,5 +35,8 @@ export function getPropertyInfo(expression, source) { else { throw new Error(`Expression '${originalExpression}' is not compatible with the validate binding-behavior.`); } + if (object === null || object === undefined) { + return null; + } return { object, propertyName }; } diff --git a/dist/es2015/validate-binding-behavior-base.d.ts b/dist/es2015/validate-binding-behavior-base.d.ts index cb4eb912..09c18430 100644 --- a/dist/es2015/validate-binding-behavior-base.d.ts +++ b/dist/es2015/validate-binding-behavior-base.d.ts @@ -8,11 +8,11 @@ export declare abstract class ValidateBindingBehaviorBase { constructor(taskQueue: TaskQueue); protected abstract getValidateTrigger(controller: ValidationController): number; /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ getTarget(binding: any, view: any): any; bind(binding: any, source: any, rulesOrController?: ValidationController | any, rules?: any): void; unbind(binding: any): void; diff --git a/dist/es2015/validate-binding-behavior-base.js b/dist/es2015/validate-binding-behavior-base.js index c9dcbc6b..991f7c52 100644 --- a/dist/es2015/validate-binding-behavior-base.js +++ b/dist/es2015/validate-binding-behavior-base.js @@ -10,11 +10,11 @@ export class ValidateBindingBehaviorBase { this.taskQueue = taskQueue; } /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ getTarget(binding, view) { const target = binding.target; // DOM element @@ -52,14 +52,20 @@ export class ValidateBindingBehaviorBase { controller.registerBinding(binding, target, rules); binding.validationController = controller; const trigger = this.getValidateTrigger(controller); + /* tslint:disable:no-bitwise */ if (trigger & validateTrigger.change) { + /* tslint:enable:no-bitwise */ binding.standardUpdateSource = binding.updateSource; + /* tslint:disable:only-arrow-functions */ binding.updateSource = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateSource(value); this.validationController.validateBinding(this); }; } + /* tslint:disable:no-bitwise */ if (trigger & validateTrigger.blur) { + /* tslint:enable:no-bitwise */ binding.validateBlurHandler = () => { this.taskQueue.queueMicroTask(() => controller.validateBinding(binding)); }; @@ -68,7 +74,9 @@ export class ValidateBindingBehaviorBase { } if (trigger !== validateTrigger.manual) { binding.standardUpdateTarget = binding.updateTarget; + /* tslint:disable:only-arrow-functions */ binding.updateTarget = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateTarget(value); this.validationController.resetBinding(this); }; diff --git a/dist/es2015/validate-trigger.d.ts b/dist/es2015/validate-trigger.d.ts index e001bfa3..82c60096 100644 --- a/dist/es2015/validate-trigger.d.ts +++ b/dist/es2015/validate-trigger.d.ts @@ -1,6 +1,6 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export declare const validateTrigger: { manual: number; blur: number; diff --git a/dist/es2015/validate-trigger.js b/dist/es2015/validate-trigger.js index f999a39b..9329aaf3 100644 --- a/dist/es2015/validate-trigger.js +++ b/dist/es2015/validate-trigger.js @@ -1,19 +1,19 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export const validateTrigger = { /** - * Manual validation. Use the controller's `validate()` and `reset()` methods - * to validate all bindings. - */ + * Manual validation. Use the controller's `validate()` and `reset()` methods + * to validate all bindings. + */ manual: 0, /** - * Validate the binding when the binding's target element fires a DOM "blur" event. - */ + * Validate the binding when the binding's target element fires a DOM "blur" event. + */ blur: 1, /** - * Validate the binding when it updates the model due to a change in the view. - */ + * Validate the binding when it updates the model due to a change in the view. + */ change: 2, /** * Validate the binding when the binding's target element fires a DOM "blur" event and diff --git a/dist/es2015/validation-controller.d.ts b/dist/es2015/validation-controller.d.ts index dcc1c174..a65621f3 100644 --- a/dist/es2015/validation-controller.d.ts +++ b/dist/es2015/validation-controller.d.ts @@ -90,7 +90,8 @@ export declare class ValidationController { private getInstructionPredicate(instruction?); /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ validate(instruction?: ValidateInstruction): Promise; /** @@ -104,11 +105,11 @@ export declare class ValidationController { private getAssociatedElements({object, propertyName}); private processErrorDelta(kind, oldErrors, newErrors); /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ validateBinding(binding: Binding): void; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ resetBinding(binding: Binding): void; } diff --git a/dist/es2015/validation-controller.js b/dist/es2015/validation-controller.js index 7cb3f54d..f419f49f 100644 --- a/dist/es2015/validation-controller.js +++ b/dist/es2015/validation-controller.js @@ -96,7 +96,7 @@ export class ValidationController { * @param rules (optional) rules associated with the binding. Validator implementation specific. */ registerBinding(binding, target, rules) { - this.bindings.set(binding, { target, rules }); + this.bindings.set(binding, { target, rules, propertyInfo: null }); } /** * Unregisters a binding with the controller. @@ -120,9 +120,8 @@ export class ValidationController { else { predicate = x => x.object === object; } - // todo: move to Validator interface: - if (rules && rules.indexOf) { - return x => predicate(x) && rules.indexOf(x.rule) !== -1; + if (rules) { + return x => predicate(x) && this.validator.ruleExists(rules, x.rule); } return predicate; } @@ -132,7 +131,8 @@ export class ValidationController { } /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ validate(instruction) { // Get a function that will process the validation instruction. @@ -159,11 +159,11 @@ export class ValidationController { promises.push(this.validator.validateObject(object, rules)); } for (let [binding, { rules }] of Array.from(this.bindings)) { - const { object, propertyName } = getPropertyInfo(binding.sourceExpression, binding.source); - if (this.objects.has(object)) { + const propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || this.objects.has(propertyInfo.object)) { continue; } - promises.push(this.validator.validateProperty(object, propertyName, rules)); + promises.push(this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); } return Promise.all(promises).then(errorSets => errorSets.reduce((a, b) => a.concat(b), [])); }; @@ -205,8 +205,8 @@ export class ValidationController { getAssociatedElements({ object, propertyName }) { const elements = []; for (let [binding, { target }] of Array.from(this.bindings)) { - const { object: o, propertyName: p } = getPropertyInfo(binding.sourceExpression, binding.source); - if (o === object && p === propertyName) { + const propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { elements.push(target); } } @@ -261,22 +261,41 @@ export class ValidationController { } } /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ validateBinding(binding) { if (!binding.isBound) { return; } - const { object, propertyName } = getPropertyInfo(binding.sourceExpression, binding.source); + let propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + let rules = undefined; const registeredBinding = this.bindings.get(binding); - const rules = registeredBinding ? registeredBinding.rules : undefined; + if (registeredBinding) { + rules = registeredBinding.rules; + registeredBinding.propertyInfo = propertyInfo; + } + if (!propertyInfo) { + return; + } + const { object, propertyName } = propertyInfo; this.validate({ object, propertyName, rules }); } /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ resetBinding(binding) { - const { object, propertyName } = getPropertyInfo(binding.sourceExpression, binding.source); + const registeredBinding = this.bindings.get(binding); + let propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo && registeredBinding) { + propertyInfo = registeredBinding.propertyInfo; + } + if (registeredBinding) { + registeredBinding.propertyInfo = null; + } + if (!propertyInfo) { + return; + } + const { object, propertyName } = propertyInfo; this.reset({ object, propertyName }); } } diff --git a/dist/es2015/validation-errors-custom-attribute.js b/dist/es2015/validation-errors-custom-attribute.js index e4888635..0debeb0d 100644 --- a/dist/es2015/validation-errors-custom-attribute.js +++ b/dist/es2015/validation-errors-custom-attribute.js @@ -19,7 +19,9 @@ export let ValidationErrorsCustomAttribute = class ValidationErrorsCustomAttribu if (a.targets[0] === b.targets[0]) { return 0; } + /* tslint:disable:no-bitwise */ return a.targets[0].compareDocumentPosition(b.targets[0]) & 2 ? 1 : -1; + /* tslint:enable:no-bitwise */ }); } interestingElements(elements) { @@ -35,7 +37,7 @@ export let ValidationErrorsCustomAttribute = class ValidationErrorsCustomAttribu for (let { error, elements } of instruction.render) { const targets = this.interestingElements(elements); if (targets.length) { - this.errors.push({ error: error, targets }); + this.errors.push({ error, targets }); } } this.sort(); diff --git a/dist/es2015/validator.d.ts b/dist/es2015/validator.d.ts index 104dc3a1..edaa3f40 100644 --- a/dist/es2015/validator.d.ts +++ b/dist/es2015/validator.d.ts @@ -19,4 +19,10 @@ export declare abstract class Validator { * specified object. This may not be possible for all implementations of this interface. */ abstract validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + abstract ruleExists(rules: any, rule: any): boolean; } diff --git a/dist/native-modules/implementation/rules.d.ts b/dist/native-modules/implementation/rules.d.ts index 71c46daf..30947f6f 100644 --- a/dist/native-modules/implementation/rules.d.ts +++ b/dist/native-modules/implementation/rules.d.ts @@ -6,7 +6,7 @@ export declare class Rules { /** * The name of the property that stores the rules. */ - static key: string; + private static key; /** * Applies the rules to a target. */ diff --git a/dist/native-modules/implementation/standard-validator.d.ts b/dist/native-modules/implementation/standard-validator.d.ts index e05e7b8e..dfe55f31 100644 --- a/dist/native-modules/implementation/standard-validator.d.ts +++ b/dist/native-modules/implementation/standard-validator.d.ts @@ -1,6 +1,7 @@ import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidationError } from '../validation-error'; +import { Rule } from './rule'; import { ValidationMessageProvider } from './validation-messages'; /** * Validates. @@ -12,9 +13,6 @@ export declare class StandardValidator extends Validator { private lookupFunctions; private getDisplayName; constructor(messageProvider: ValidationMessageProvider, resources: ViewResources); - private getMessage(rule, object, value); - private validateRuleSequence(object, propertyName, ruleSequence, sequence); - private validate(object, propertyName, rules); /** * Validates the specified property. * @param object The object to validate. @@ -30,4 +28,13 @@ export declare class StandardValidator extends Validator { * for the object created by ValidationRules....on(class/object) */ validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + ruleExists(rules: Rule[][], rule: Rule): boolean; + private getMessage(rule, object, value); + private validateRuleSequence(object, propertyName, ruleSequence, sequence); + private validate(object, propertyName, rules); } diff --git a/dist/native-modules/implementation/standard-validator.js b/dist/native-modules/implementation/standard-validator.js index 6ad67066..92af0f9f 100644 --- a/dist/native-modules/implementation/standard-validator.js +++ b/dist/native-modules/implementation/standard-validator.js @@ -20,6 +20,39 @@ export var StandardValidator = (function (_super) { this.lookupFunctions = resources.lookupFunctions; this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); } + /** + * Validates the specified property. + * @param object The object to validate. + * @param propertyName The name of the property to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { + return this.validate(object, propertyName, rules || null); + }; + /** + * Validates all rules for specified object and it's properties. + * @param object The object to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateObject = function (object, rules) { + return this.validate(object, null, rules || null); + }; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + StandardValidator.prototype.ruleExists = function (rules, rule) { + var i = rules.length; + while (i--) { + if (rules[i].indexOf(rule) !== -1) { + return true; + } + } + return false; + }; StandardValidator.prototype.getMessage = function (rule, object, value) { var expression = rule.message || this.messageProvider.getMessage(rule.messageKey); var _a = rule.property, propertyName = _a.name, displayName = _a.displayName; @@ -91,25 +124,6 @@ export var StandardValidator = (function (_super) { } return this.validateRuleSequence(object, propertyName, rules, 0); }; - /** - * Validates the specified property. - * @param object The object to validate. - * @param propertyName The name of the property to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { - return this.validate(object, propertyName, rules || null); - }; - /** - * Validates all rules for specified object and it's properties. - * @param object The object to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateObject = function (object, rules) { - return this.validate(object, null, rules || null); - }; StandardValidator.inject = [ValidationMessageProvider, ViewResources]; return StandardValidator; }(Validator)); diff --git a/dist/native-modules/implementation/validation-parser.d.ts b/dist/native-modules/implementation/validation-parser.d.ts index 43f09ca5..75b2c7af 100644 --- a/dist/native-modules/implementation/validation-parser.d.ts +++ b/dist/native-modules/implementation/validation-parser.d.ts @@ -13,10 +13,10 @@ export declare class ValidationParser { private undefinedExpression; private cache; constructor(parser: Parser, bindinqLanguage: BindingLanguage); - private coalesce(part); parseMessage(message: string): Expression; - private getAccessorExpression(fn); parseProperty(property: string | PropertyAccessor): RuleProperty; + private coalesce(part); + private getAccessorExpression(fn); } export declare class MessageExpressionValidator extends Unparser { private originalMessage; diff --git a/dist/native-modules/implementation/validation-parser.js b/dist/native-modules/implementation/validation-parser.js index 1587f771..0d11f450 100644 --- a/dist/native-modules/implementation/validation-parser.js +++ b/dist/native-modules/implementation/validation-parser.js @@ -16,10 +16,6 @@ export var ValidationParser = (function () { this.undefinedExpression = new LiteralPrimitive(undefined); this.cache = {}; } - ValidationParser.prototype.coalesce = function (part) { - // part === null || part === undefined ? '' : part - return new Conditional(new Binary('||', new Binary('===', part, this.nullExpression), new Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new CallMember(part, 'toString', [])); - }; ValidationParser.prototype.parseMessage = function (message) { if (this.cache[message] !== undefined) { return this.cache[message]; @@ -36,15 +32,6 @@ export var ValidationParser = (function () { this.cache[message] = expression; return expression; }; - ValidationParser.prototype.getAccessorExpression = function (fn) { - var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; - var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; - var match = classic.exec(fn) || arrow.exec(fn); - if (match === null) { - throw new Error("Unable to parse accessor function:\n" + fn); - } - return this.parser.parse(match[1]); - }; ValidationParser.prototype.parseProperty = function (property) { if (isString(property)) { return { name: property, displayName: null }; @@ -59,6 +46,19 @@ export var ValidationParser = (function () { } throw new Error("Invalid subject: \"" + accessor + "\""); }; + ValidationParser.prototype.coalesce = function (part) { + // part === null || part === undefined ? '' : part + return new Conditional(new Binary('||', new Binary('===', part, this.nullExpression), new Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new CallMember(part, 'toString', [])); + }; + ValidationParser.prototype.getAccessorExpression = function (fn) { + var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; + var arrow = /^\(?[$_\w\d]+\)?\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; + var match = classic.exec(fn) || arrow.exec(fn); + if (match === null) { + throw new Error("Unable to parse accessor function:\n" + fn); + } + return this.parser.parse(match[1]); + }; ValidationParser.inject = [Parser, BindingLanguage]; return ValidationParser; }()); diff --git a/dist/native-modules/implementation/validation-rules.d.ts b/dist/native-modules/implementation/validation-rules.d.ts index 1bd93972..59ba7410 100644 --- a/dist/native-modules/implementation/validation-rules.d.ts +++ b/dist/native-modules/implementation/validation-rules.d.ts @@ -195,7 +195,8 @@ export declare class FluentEnsure { constructor(parser: ValidationParser); /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ ensure(property: string | PropertyAccessor): FluentRules; /** @@ -233,7 +234,8 @@ export declare class ValidationRules { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ static customRule(name: string, condition: (value: any, object?: any, ...args: any[]) => boolean | Promise, message: string, argsToConfig?: (...args: any[]) => any): void; /** diff --git a/dist/native-modules/implementation/validation-rules.js b/dist/native-modules/implementation/validation-rules.js index 4fc9daa2..02920554 100644 --- a/dist/native-modules/implementation/validation-rules.js +++ b/dist/native-modules/implementation/validation-rules.js @@ -250,7 +250,9 @@ export var FluentRules = (function () { * null, undefined and empty-string values are considered valid. */ FluentRules.prototype.email = function () { - return this.matches(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i) + // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address + /* tslint:disable:max-line-length */ + return this.matches(/^[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])?)*$/) .withMessageKey('email'); }; /** @@ -300,17 +302,20 @@ export var FluentRules = (function () { * Part of the fluent rule API. Enables targeting properties and objects with rules. */ export var FluentEnsure = (function () { + /* tslint:enable */ function FluentEnsure(parser) { this.parser = parser; /** * Rules that have been defined using the fluent API. */ this.rules = []; + /* tslint:disable */ this._sequence = 0; } /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ FluentEnsure.prototype.ensure = function (property) { this.assertInitialized(); @@ -375,7 +380,8 @@ export var ValidationRules = (function () { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ ValidationRules.customRule = function (name, condition, message, argsToConfig) { validationMessages[name] = message; diff --git a/dist/native-modules/property-info.d.ts b/dist/native-modules/property-info.d.ts index ea68d9a0..59b760bf 100644 --- a/dist/native-modules/property-info.d.ts +++ b/dist/native-modules/property-info.d.ts @@ -5,6 +5,6 @@ import { Expression } from 'aurelia-binding'; * @param source The scope */ export declare function getPropertyInfo(expression: Expression, source: any): { - object: any; + object: Object; propertyName: string; -}; +} | null; diff --git a/dist/native-modules/property-info.js b/dist/native-modules/property-info.js index 5b2e3be2..75edf715 100644 --- a/dist/native-modules/property-info.js +++ b/dist/native-modules/property-info.js @@ -1,16 +1,12 @@ import { AccessMember, AccessScope, AccessKeyed, BindingBehavior, ValueConverter } from 'aurelia-binding'; function getObject(expression, objectExpression, source) { var value = objectExpression.evaluate(source, null); - if (value !== null && (typeof value === 'object' || typeof value === 'function')) { + if (value === null || value === undefined || value instanceof Object) { return value; } - if (value === null) { - value = 'null'; - } - else if (value === undefined) { - value = 'undefined'; - } - throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object."); + /* tslint:disable */ + throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object, null or undefined."); + /* tslint:enable */ } /** * Retrieves the object and property name for the specified expression. @@ -39,5 +35,8 @@ export function getPropertyInfo(expression, source) { else { throw new Error("Expression '" + originalExpression + "' is not compatible with the validate binding-behavior."); } + if (object === null || object === undefined) { + return null; + } return { object: object, propertyName: propertyName }; } diff --git a/dist/native-modules/validate-binding-behavior-base.d.ts b/dist/native-modules/validate-binding-behavior-base.d.ts index cb4eb912..09c18430 100644 --- a/dist/native-modules/validate-binding-behavior-base.d.ts +++ b/dist/native-modules/validate-binding-behavior-base.d.ts @@ -8,11 +8,11 @@ export declare abstract class ValidateBindingBehaviorBase { constructor(taskQueue: TaskQueue); protected abstract getValidateTrigger(controller: ValidationController): number; /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ getTarget(binding: any, view: any): any; bind(binding: any, source: any, rulesOrController?: ValidationController | any, rules?: any): void; unbind(binding: any): void; diff --git a/dist/native-modules/validate-binding-behavior-base.js b/dist/native-modules/validate-binding-behavior-base.js index 6f96fd0e..88d6aa73 100644 --- a/dist/native-modules/validate-binding-behavior-base.js +++ b/dist/native-modules/validate-binding-behavior-base.js @@ -10,11 +10,11 @@ export var ValidateBindingBehaviorBase = (function () { this.taskQueue = taskQueue; } /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ ValidateBindingBehaviorBase.prototype.getTarget = function (binding, view) { var target = binding.target; // DOM element @@ -53,14 +53,20 @@ export var ValidateBindingBehaviorBase = (function () { controller.registerBinding(binding, target, rules); binding.validationController = controller; var trigger = this.getValidateTrigger(controller); + /* tslint:disable:no-bitwise */ if (trigger & validateTrigger.change) { + /* tslint:enable:no-bitwise */ binding.standardUpdateSource = binding.updateSource; + /* tslint:disable:only-arrow-functions */ binding.updateSource = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateSource(value); this.validationController.validateBinding(this); }; } + /* tslint:disable:no-bitwise */ if (trigger & validateTrigger.blur) { + /* tslint:enable:no-bitwise */ binding.validateBlurHandler = function () { _this.taskQueue.queueMicroTask(function () { return controller.validateBinding(binding); }); }; @@ -69,7 +75,9 @@ export var ValidateBindingBehaviorBase = (function () { } if (trigger !== validateTrigger.manual) { binding.standardUpdateTarget = binding.updateTarget; + /* tslint:disable:only-arrow-functions */ binding.updateTarget = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateTarget(value); this.validationController.resetBinding(this); }; diff --git a/dist/native-modules/validate-trigger.d.ts b/dist/native-modules/validate-trigger.d.ts index e001bfa3..82c60096 100644 --- a/dist/native-modules/validate-trigger.d.ts +++ b/dist/native-modules/validate-trigger.d.ts @@ -1,6 +1,6 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export declare const validateTrigger: { manual: number; blur: number; diff --git a/dist/native-modules/validate-trigger.js b/dist/native-modules/validate-trigger.js index 06c3554b..7bae6c41 100644 --- a/dist/native-modules/validate-trigger.js +++ b/dist/native-modules/validate-trigger.js @@ -1,19 +1,19 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export var validateTrigger = { /** - * Manual validation. Use the controller's `validate()` and `reset()` methods - * to validate all bindings. - */ + * Manual validation. Use the controller's `validate()` and `reset()` methods + * to validate all bindings. + */ manual: 0, /** - * Validate the binding when the binding's target element fires a DOM "blur" event. - */ + * Validate the binding when the binding's target element fires a DOM "blur" event. + */ blur: 1, /** - * Validate the binding when it updates the model due to a change in the view. - */ + * Validate the binding when it updates the model due to a change in the view. + */ change: 2, /** * Validate the binding when the binding's target element fires a DOM "blur" event and diff --git a/dist/native-modules/validation-controller.d.ts b/dist/native-modules/validation-controller.d.ts index dcc1c174..a65621f3 100644 --- a/dist/native-modules/validation-controller.d.ts +++ b/dist/native-modules/validation-controller.d.ts @@ -90,7 +90,8 @@ export declare class ValidationController { private getInstructionPredicate(instruction?); /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ validate(instruction?: ValidateInstruction): Promise; /** @@ -104,11 +105,11 @@ export declare class ValidationController { private getAssociatedElements({object, propertyName}); private processErrorDelta(kind, oldErrors, newErrors); /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ validateBinding(binding: Binding): void; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ resetBinding(binding: Binding): void; } diff --git a/dist/native-modules/validation-controller.js b/dist/native-modules/validation-controller.js index 02d56385..07052771 100644 --- a/dist/native-modules/validation-controller.js +++ b/dist/native-modules/validation-controller.js @@ -98,7 +98,7 @@ export var ValidationController = (function () { * @param rules (optional) rules associated with the binding. Validator implementation specific. */ ValidationController.prototype.registerBinding = function (binding, target, rules) { - this.bindings.set(binding, { target: target, rules: rules }); + this.bindings.set(binding, { target: target, rules: rules, propertyInfo: null }); }; /** * Unregisters a binding with the controller. @@ -113,6 +113,7 @@ export var ValidationController = (function () { * relevant errors in the list of rendered errors. */ ValidationController.prototype.getInstructionPredicate = function (instruction) { + var _this = this; if (instruction) { var object_1 = instruction.object, propertyName_1 = instruction.propertyName, rules_1 = instruction.rules; var predicate_1; @@ -122,9 +123,8 @@ export var ValidationController = (function () { else { predicate_1 = function (x) { return x.object === object_1; }; } - // todo: move to Validator interface: - if (rules_1 && rules_1.indexOf) { - return function (x) { return predicate_1(x) && rules_1.indexOf(x.rule) !== -1; }; + if (rules_1) { + return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); }; } return predicate_1; } @@ -134,7 +134,8 @@ export var ValidationController = (function () { }; /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ ValidationController.prototype.validate = function (instruction) { var _this = this; @@ -164,11 +165,11 @@ export var ValidationController = (function () { } for (var _c = 0, _d = Array.from(_this.bindings); _c < _d.length; _c++) { var _e = _d[_c], binding = _e[0], rules = _e[1].rules; - var _f = getPropertyInfo(binding.sourceExpression, binding.source), object = _f.object, propertyName = _f.propertyName; - if (_this.objects.has(object)) { + var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || _this.objects.has(propertyInfo.object)) { continue; } - promises.push(_this.validator.validateProperty(object, propertyName, rules)); + promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); } return Promise.all(promises).then(function (errorSets) { return errorSets.reduce(function (a, b) { return a.concat(b); }, []); }); }; @@ -212,8 +213,8 @@ export var ValidationController = (function () { var elements = []; for (var _i = 0, _b = Array.from(this.bindings); _i < _b.length; _i++) { var _c = _b[_i], binding = _c[0], target = _c[1].target; - var _d = getPropertyInfo(binding.sourceExpression, binding.source), o = _d.object, p = _d.propertyName; - if (o === object && p === propertyName) { + var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { elements.push(target); } } @@ -275,22 +276,41 @@ export var ValidationController = (function () { } }; /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ ValidationController.prototype.validateBinding = function (binding) { if (!binding.isBound) { return; } - var _a = getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + var rules = undefined; var registeredBinding = this.bindings.get(binding); - var rules = registeredBinding ? registeredBinding.rules : undefined; + if (registeredBinding) { + rules = registeredBinding.rules; + registeredBinding.propertyInfo = propertyInfo; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.validate({ object: object, propertyName: propertyName, rules: rules }); }; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ ValidationController.prototype.resetBinding = function (binding) { - var _a = getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var registeredBinding = this.bindings.get(binding); + var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo && registeredBinding) { + propertyInfo = registeredBinding.propertyInfo; + } + if (registeredBinding) { + registeredBinding.propertyInfo = null; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.reset({ object: object, propertyName: propertyName }); }; ValidationController.inject = [Validator]; diff --git a/dist/native-modules/validation-errors-custom-attribute.js b/dist/native-modules/validation-errors-custom-attribute.js index 9e70fb9c..118320ac 100644 --- a/dist/native-modules/validation-errors-custom-attribute.js +++ b/dist/native-modules/validation-errors-custom-attribute.js @@ -19,7 +19,9 @@ export var ValidationErrorsCustomAttribute = (function () { if (a.targets[0] === b.targets[0]) { return 0; } + /* tslint:disable:no-bitwise */ return a.targets[0].compareDocumentPosition(b.targets[0]) & 2 ? 1 : -1; + /* tslint:enable:no-bitwise */ }); }; ValidationErrorsCustomAttribute.prototype.interestingElements = function (elements) { diff --git a/dist/native-modules/validator.d.ts b/dist/native-modules/validator.d.ts index 104dc3a1..edaa3f40 100644 --- a/dist/native-modules/validator.d.ts +++ b/dist/native-modules/validator.d.ts @@ -19,4 +19,10 @@ export declare abstract class Validator { * specified object. This may not be possible for all implementations of this interface. */ abstract validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + abstract ruleExists(rules: any, rule: any): boolean; } diff --git a/dist/system/implementation/rules.d.ts b/dist/system/implementation/rules.d.ts index 71c46daf..30947f6f 100644 --- a/dist/system/implementation/rules.d.ts +++ b/dist/system/implementation/rules.d.ts @@ -6,7 +6,7 @@ export declare class Rules { /** * The name of the property that stores the rules. */ - static key: string; + private static key; /** * Applies the rules to a target. */ diff --git a/dist/system/implementation/standard-validator.d.ts b/dist/system/implementation/standard-validator.d.ts index e05e7b8e..dfe55f31 100644 --- a/dist/system/implementation/standard-validator.d.ts +++ b/dist/system/implementation/standard-validator.d.ts @@ -1,6 +1,7 @@ import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidationError } from '../validation-error'; +import { Rule } from './rule'; import { ValidationMessageProvider } from './validation-messages'; /** * Validates. @@ -12,9 +13,6 @@ export declare class StandardValidator extends Validator { private lookupFunctions; private getDisplayName; constructor(messageProvider: ValidationMessageProvider, resources: ViewResources); - private getMessage(rule, object, value); - private validateRuleSequence(object, propertyName, ruleSequence, sequence); - private validate(object, propertyName, rules); /** * Validates the specified property. * @param object The object to validate. @@ -30,4 +28,13 @@ export declare class StandardValidator extends Validator { * for the object created by ValidationRules....on(class/object) */ validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + ruleExists(rules: Rule[][], rule: Rule): boolean; + private getMessage(rule, object, value); + private validateRuleSequence(object, propertyName, ruleSequence, sequence); + private validate(object, propertyName, rules); } diff --git a/dist/system/implementation/standard-validator.js b/dist/system/implementation/standard-validator.js index a7d85a9d..da9cac99 100644 --- a/dist/system/implementation/standard-validator.js +++ b/dist/system/implementation/standard-validator.js @@ -38,6 +38,39 @@ System.register(['aurelia-templating', '../validator', '../validation-error', '. this.lookupFunctions = resources.lookupFunctions; this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); } + /** + * Validates the specified property. + * @param object The object to validate. + * @param propertyName The name of the property to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { + return this.validate(object, propertyName, rules || null); + }; + /** + * Validates all rules for specified object and it's properties. + * @param object The object to validate. + * @param rules Optional. If unspecified, the rules will be looked up using the metadata + * for the object created by ValidationRules....on(class/object) + */ + StandardValidator.prototype.validateObject = function (object, rules) { + return this.validate(object, null, rules || null); + }; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + StandardValidator.prototype.ruleExists = function (rules, rule) { + var i = rules.length; + while (i--) { + if (rules[i].indexOf(rule) !== -1) { + return true; + } + } + return false; + }; StandardValidator.prototype.getMessage = function (rule, object, value) { var expression = rule.message || this.messageProvider.getMessage(rule.messageKey); var _a = rule.property, propertyName = _a.name, displayName = _a.displayName; @@ -109,25 +142,6 @@ System.register(['aurelia-templating', '../validator', '../validation-error', '. } return this.validateRuleSequence(object, propertyName, rules, 0); }; - /** - * Validates the specified property. - * @param object The object to validate. - * @param propertyName The name of the property to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateProperty = function (object, propertyName, rules) { - return this.validate(object, propertyName, rules || null); - }; - /** - * Validates all rules for specified object and it's properties. - * @param object The object to validate. - * @param rules Optional. If unspecified, the rules will be looked up using the metadata - * for the object created by ValidationRules....on(class/object) - */ - StandardValidator.prototype.validateObject = function (object, rules) { - return this.validate(object, null, rules || null); - }; StandardValidator.inject = [validation_messages_1.ValidationMessageProvider, aurelia_templating_1.ViewResources]; return StandardValidator; }(validator_1.Validator)); diff --git a/dist/system/implementation/validation-parser.d.ts b/dist/system/implementation/validation-parser.d.ts index 43f09ca5..75b2c7af 100644 --- a/dist/system/implementation/validation-parser.d.ts +++ b/dist/system/implementation/validation-parser.d.ts @@ -13,10 +13,10 @@ export declare class ValidationParser { private undefinedExpression; private cache; constructor(parser: Parser, bindinqLanguage: BindingLanguage); - private coalesce(part); parseMessage(message: string): Expression; - private getAccessorExpression(fn); parseProperty(property: string | PropertyAccessor): RuleProperty; + private coalesce(part); + private getAccessorExpression(fn); } export declare class MessageExpressionValidator extends Unparser { private originalMessage; diff --git a/dist/system/implementation/validation-parser.js b/dist/system/implementation/validation-parser.js index 95033a48..6aa86a4e 100644 --- a/dist/system/implementation/validation-parser.js +++ b/dist/system/implementation/validation-parser.js @@ -32,10 +32,6 @@ System.register(['aurelia-binding', 'aurelia-templating', './util', 'aurelia-log this.undefinedExpression = new aurelia_binding_1.LiteralPrimitive(undefined); this.cache = {}; } - ValidationParser.prototype.coalesce = function (part) { - // part === null || part === undefined ? '' : part - return new aurelia_binding_1.Conditional(new aurelia_binding_1.Binary('||', new aurelia_binding_1.Binary('===', part, this.nullExpression), new aurelia_binding_1.Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new aurelia_binding_1.CallMember(part, 'toString', [])); - }; ValidationParser.prototype.parseMessage = function (message) { if (this.cache[message] !== undefined) { return this.cache[message]; @@ -52,15 +48,6 @@ System.register(['aurelia-binding', 'aurelia-templating', './util', 'aurelia-log this.cache[message] = expression; return expression; }; - ValidationParser.prototype.getAccessorExpression = function (fn) { - var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; - var arrow = /^[$_\w\d]+\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; - var match = classic.exec(fn) || arrow.exec(fn); - if (match === null) { - throw new Error("Unable to parse accessor function:\n" + fn); - } - return this.parser.parse(match[1]); - }; ValidationParser.prototype.parseProperty = function (property) { if (util_1.isString(property)) { return { name: property, displayName: null }; @@ -75,6 +62,19 @@ System.register(['aurelia-binding', 'aurelia-templating', './util', 'aurelia-log } throw new Error("Invalid subject: \"" + accessor + "\""); }; + ValidationParser.prototype.coalesce = function (part) { + // part === null || part === undefined ? '' : part + return new aurelia_binding_1.Conditional(new aurelia_binding_1.Binary('||', new aurelia_binding_1.Binary('===', part, this.nullExpression), new aurelia_binding_1.Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new aurelia_binding_1.CallMember(part, 'toString', [])); + }; + ValidationParser.prototype.getAccessorExpression = function (fn) { + var classic = /^function\s*\([$_\w\d]+\)\s*\{\s*(?:"use strict";)?\s*return\s+[$_\w\d]+\.([$_\w\d]+)\s*;?\s*\}$/; + var arrow = /^\(?[$_\w\d]+\)?\s*=>\s*[$_\w\d]+\.([$_\w\d]+)$/; + var match = classic.exec(fn) || arrow.exec(fn); + if (match === null) { + throw new Error("Unable to parse accessor function:\n" + fn); + } + return this.parser.parse(match[1]); + }; ValidationParser.inject = [aurelia_binding_1.Parser, aurelia_templating_1.BindingLanguage]; return ValidationParser; }()); diff --git a/dist/system/implementation/validation-rules.d.ts b/dist/system/implementation/validation-rules.d.ts index 1bd93972..59ba7410 100644 --- a/dist/system/implementation/validation-rules.d.ts +++ b/dist/system/implementation/validation-rules.d.ts @@ -195,7 +195,8 @@ export declare class FluentEnsure { constructor(parser: ValidationParser); /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ ensure(property: string | PropertyAccessor): FluentRules; /** @@ -233,7 +234,8 @@ export declare class ValidationRules { * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ static customRule(name: string, condition: (value: any, object?: any, ...args: any[]) => boolean | Promise, message: string, argsToConfig?: (...args: any[]) => any): void; /** diff --git a/dist/system/implementation/validation-rules.js b/dist/system/implementation/validation-rules.js index 0e06eab0..6984b449 100644 --- a/dist/system/implementation/validation-rules.js +++ b/dist/system/implementation/validation-rules.js @@ -265,7 +265,9 @@ System.register(['./util', './rules', './validation-messages'], function(exports * null, undefined and empty-string values are considered valid. */ FluentRules.prototype.email = function () { - return this.matches(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i) + // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address + /* tslint:disable:max-line-length */ + return this.matches(/^[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])?)*$/) .withMessageKey('email'); }; /** @@ -316,17 +318,20 @@ System.register(['./util', './rules', './validation-messages'], function(exports * Part of the fluent rule API. Enables targeting properties and objects with rules. */ FluentEnsure = (function () { + /* tslint:enable */ function FluentEnsure(parser) { this.parser = parser; /** * Rules that have been defined using the fluent API. */ this.rules = []; + /* tslint:disable */ this._sequence = 0; } /** * Target a property with validation rules. - * @param property The property to target. Can be the property name or a property accessor function. + * @param property The property to target. Can be the property name or a property accessor + * function. */ FluentEnsure.prototype.ensure = function (property) { this.assertInitialized(); @@ -392,7 +397,8 @@ System.register(['./util', './rules', './validation-messages'], function(exports * @param name The name of the custom rule. Also serves as the message key. * @param condition The rule function. * @param message The message expression - * @param argsToConfig A function that maps the rule's arguments to a "config" object that can be used when evaluating the message expression. + * @param argsToConfig A function that maps the rule's arguments to a "config" + * object that can be used when evaluating the message expression. */ ValidationRules.customRule = function (name, condition, message, argsToConfig) { validation_messages_1.validationMessages[name] = message; diff --git a/dist/system/property-info.d.ts b/dist/system/property-info.d.ts index ea68d9a0..59b760bf 100644 --- a/dist/system/property-info.d.ts +++ b/dist/system/property-info.d.ts @@ -5,6 +5,6 @@ import { Expression } from 'aurelia-binding'; * @param source The scope */ export declare function getPropertyInfo(expression: Expression, source: any): { - object: any; + object: Object; propertyName: string; -}; +} | null; diff --git a/dist/system/property-info.js b/dist/system/property-info.js index 6aa9b2b3..2ecb1a24 100644 --- a/dist/system/property-info.js +++ b/dist/system/property-info.js @@ -4,16 +4,12 @@ System.register(['aurelia-binding'], function(exports_1, context_1) { var aurelia_binding_1; function getObject(expression, objectExpression, source) { var value = objectExpression.evaluate(source, null); - if (value !== null && (typeof value === 'object' || typeof value === 'function')) { + if (value === null || value === undefined || value instanceof Object) { return value; } - if (value === null) { - value = 'null'; - } - else if (value === undefined) { - value = 'undefined'; - } - throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object."); + /* tslint:disable */ + throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object, null or undefined."); + /* tslint:enable */ } /** * Retrieves the object and property name for the specified expression. @@ -42,6 +38,9 @@ System.register(['aurelia-binding'], function(exports_1, context_1) { else { throw new Error("Expression '" + originalExpression + "' is not compatible with the validate binding-behavior."); } + if (object === null || object === undefined) { + return null; + } return { object: object, propertyName: propertyName }; } exports_1("getPropertyInfo", getPropertyInfo); diff --git a/dist/system/validate-binding-behavior-base.d.ts b/dist/system/validate-binding-behavior-base.d.ts index cb4eb912..09c18430 100644 --- a/dist/system/validate-binding-behavior-base.d.ts +++ b/dist/system/validate-binding-behavior-base.d.ts @@ -8,11 +8,11 @@ export declare abstract class ValidateBindingBehaviorBase { constructor(taskQueue: TaskQueue); protected abstract getValidateTrigger(controller: ValidationController): number; /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ getTarget(binding: any, view: any): any; bind(binding: any, source: any, rulesOrController?: ValidationController | any, rules?: any): void; unbind(binding: any): void; diff --git a/dist/system/validate-binding-behavior-base.js b/dist/system/validate-binding-behavior-base.js index d05523de..441f776d 100644 --- a/dist/system/validate-binding-behavior-base.js +++ b/dist/system/validate-binding-behavior-base.js @@ -26,11 +26,11 @@ System.register(['aurelia-dependency-injection', 'aurelia-pal', './validation-co this.taskQueue = taskQueue; } /** - * Gets the DOM element associated with the data-binding. Most of the time it's - * the binding.target but sometimes binding.target is an aurelia custom element, - * or custom attribute which is a javascript "class" instance, so we need to use - * the controller's container to retrieve the actual DOM element. - */ + * Gets the DOM element associated with the data-binding. Most of the time it's + * the binding.target but sometimes binding.target is an aurelia custom element, + * or custom attribute which is a javascript "class" instance, so we need to use + * the controller's container to retrieve the actual DOM element. + */ ValidateBindingBehaviorBase.prototype.getTarget = function (binding, view) { var target = binding.target; // DOM element @@ -69,14 +69,20 @@ System.register(['aurelia-dependency-injection', 'aurelia-pal', './validation-co controller.registerBinding(binding, target, rules); binding.validationController = controller; var trigger = this.getValidateTrigger(controller); + /* tslint:disable:no-bitwise */ if (trigger & validate_trigger_1.validateTrigger.change) { + /* tslint:enable:no-bitwise */ binding.standardUpdateSource = binding.updateSource; + /* tslint:disable:only-arrow-functions */ binding.updateSource = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateSource(value); this.validationController.validateBinding(this); }; } + /* tslint:disable:no-bitwise */ if (trigger & validate_trigger_1.validateTrigger.blur) { + /* tslint:enable:no-bitwise */ binding.validateBlurHandler = function () { _this.taskQueue.queueMicroTask(function () { return controller.validateBinding(binding); }); }; @@ -85,7 +91,9 @@ System.register(['aurelia-dependency-injection', 'aurelia-pal', './validation-co } if (trigger !== validate_trigger_1.validateTrigger.manual) { binding.standardUpdateTarget = binding.updateTarget; + /* tslint:disable:only-arrow-functions */ binding.updateTarget = function (value) { + /* tslint:enable:only-arrow-functions */ this.standardUpdateTarget(value); this.validationController.resetBinding(this); }; diff --git a/dist/system/validate-trigger.d.ts b/dist/system/validate-trigger.d.ts index e001bfa3..82c60096 100644 --- a/dist/system/validate-trigger.d.ts +++ b/dist/system/validate-trigger.d.ts @@ -1,6 +1,6 @@ /** -* Validation triggers. -*/ + * Validation triggers. + */ export declare const validateTrigger: { manual: number; blur: number; diff --git a/dist/system/validate-trigger.js b/dist/system/validate-trigger.js index f3598e2c..398898da 100644 --- a/dist/system/validate-trigger.js +++ b/dist/system/validate-trigger.js @@ -6,21 +6,21 @@ System.register([], function(exports_1, context_1) { setters:[], execute: function() { /** - * Validation triggers. - */ + * Validation triggers. + */ exports_1("validateTrigger", validateTrigger = { /** - * Manual validation. Use the controller's `validate()` and `reset()` methods - * to validate all bindings. - */ + * Manual validation. Use the controller's `validate()` and `reset()` methods + * to validate all bindings. + */ manual: 0, /** - * Validate the binding when the binding's target element fires a DOM "blur" event. - */ + * Validate the binding when the binding's target element fires a DOM "blur" event. + */ blur: 1, /** - * Validate the binding when it updates the model due to a change in the view. - */ + * Validate the binding when it updates the model due to a change in the view. + */ change: 2, /** * Validate the binding when the binding's target element fires a DOM "blur" event and diff --git a/dist/system/validation-controller.d.ts b/dist/system/validation-controller.d.ts index dcc1c174..a65621f3 100644 --- a/dist/system/validation-controller.d.ts +++ b/dist/system/validation-controller.d.ts @@ -90,7 +90,8 @@ export declare class ValidationController { private getInstructionPredicate(instruction?); /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ validate(instruction?: ValidateInstruction): Promise; /** @@ -104,11 +105,11 @@ export declare class ValidationController { private getAssociatedElements({object, propertyName}); private processErrorDelta(kind, oldErrors, newErrors); /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ validateBinding(binding: Binding): void; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ resetBinding(binding: Binding): void; } diff --git a/dist/system/validation-controller.js b/dist/system/validation-controller.js index 7d5c618d..eaf565a8 100644 --- a/dist/system/validation-controller.js +++ b/dist/system/validation-controller.js @@ -114,7 +114,7 @@ System.register(['./validator', './validate-trigger', './property-info', './vali * @param rules (optional) rules associated with the binding. Validator implementation specific. */ ValidationController.prototype.registerBinding = function (binding, target, rules) { - this.bindings.set(binding, { target: target, rules: rules }); + this.bindings.set(binding, { target: target, rules: rules, propertyInfo: null }); }; /** * Unregisters a binding with the controller. @@ -129,6 +129,7 @@ System.register(['./validator', './validate-trigger', './property-info', './vali * relevant errors in the list of rendered errors. */ ValidationController.prototype.getInstructionPredicate = function (instruction) { + var _this = this; if (instruction) { var object_1 = instruction.object, propertyName_1 = instruction.propertyName, rules_1 = instruction.rules; var predicate_1; @@ -138,9 +139,8 @@ System.register(['./validator', './validate-trigger', './property-info', './vali else { predicate_1 = function (x) { return x.object === object_1; }; } - // todo: move to Validator interface: - if (rules_1 && rules_1.indexOf) { - return function (x) { return predicate_1(x) && rules_1.indexOf(x.rule) !== -1; }; + if (rules_1) { + return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); }; } return predicate_1; } @@ -150,7 +150,8 @@ System.register(['./validator', './validate-trigger', './property-info', './vali }; /** * Validates and renders errors. - * @param instruction Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. */ ValidationController.prototype.validate = function (instruction) { var _this = this; @@ -180,11 +181,11 @@ System.register(['./validator', './validate-trigger', './property-info', './vali } for (var _c = 0, _d = Array.from(_this.bindings); _c < _d.length; _c++) { var _e = _d[_c], binding = _e[0], rules = _e[1].rules; - var _f = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _f.object, propertyName = _f.propertyName; - if (_this.objects.has(object)) { + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || _this.objects.has(propertyInfo.object)) { continue; } - promises.push(_this.validator.validateProperty(object, propertyName, rules)); + promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); } return Promise.all(promises).then(function (errorSets) { return errorSets.reduce(function (a, b) { return a.concat(b); }, []); }); }; @@ -228,8 +229,8 @@ System.register(['./validator', './validate-trigger', './property-info', './vali var elements = []; for (var _i = 0, _b = Array.from(this.bindings); _i < _b.length; _i++) { var _c = _b[_i], binding = _c[0], target = _c[1].target; - var _d = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), o = _d.object, p = _d.propertyName; - if (o === object && p === propertyName) { + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { elements.push(target); } } @@ -291,22 +292,41 @@ System.register(['./validator', './validate-trigger', './property-info', './vali } }; /** - * Validates the property associated with a binding. - */ + * Validates the property associated with a binding. + */ ValidationController.prototype.validateBinding = function (binding) { if (!binding.isBound) { return; } - var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + var rules = undefined; var registeredBinding = this.bindings.get(binding); - var rules = registeredBinding ? registeredBinding.rules : undefined; + if (registeredBinding) { + rules = registeredBinding.rules; + registeredBinding.propertyInfo = propertyInfo; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.validate({ object: object, propertyName: propertyName, rules: rules }); }; /** - * Resets the errors for a property associated with a binding. - */ + * Resets the errors for a property associated with a binding. + */ ValidationController.prototype.resetBinding = function (binding) { - var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; + var registeredBinding = this.bindings.get(binding); + var propertyInfo = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo && registeredBinding) { + propertyInfo = registeredBinding.propertyInfo; + } + if (registeredBinding) { + registeredBinding.propertyInfo = null; + } + if (!propertyInfo) { + return; + } + var object = propertyInfo.object, propertyName = propertyInfo.propertyName; this.reset({ object: object, propertyName: propertyName }); }; ValidationController.inject = [validator_1.Validator]; diff --git a/dist/system/validation-errors-custom-attribute.js b/dist/system/validation-errors-custom-attribute.js index be9d6dfb..c91e2de2 100644 --- a/dist/system/validation-errors-custom-attribute.js +++ b/dist/system/validation-errors-custom-attribute.js @@ -35,7 +35,9 @@ System.register(['aurelia-binding', 'aurelia-dependency-injection', 'aurelia-tem if (a.targets[0] === b.targets[0]) { return 0; } + /* tslint:disable:no-bitwise */ return a.targets[0].compareDocumentPosition(b.targets[0]) & 2 ? 1 : -1; + /* tslint:enable:no-bitwise */ }); }; ValidationErrorsCustomAttribute.prototype.interestingElements = function (elements) { diff --git a/dist/system/validator.d.ts b/dist/system/validator.d.ts index 104dc3a1..edaa3f40 100644 --- a/dist/system/validator.d.ts +++ b/dist/system/validator.d.ts @@ -19,4 +19,10 @@ export declare abstract class Validator { * specified object. This may not be possible for all implementations of this interface. */ abstract validateObject(object: any, rules?: any): Promise; + /** + * Determines whether a rule exists in a set of rules. + * @param rules The rules to search. + * @parem rule The rule to find. + */ + abstract ruleExists(rules: any, rule: any): boolean; } diff --git a/doc/api.json b/doc/api.json index fef434b2..c94ffdd1 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"name":"aurelia-validation","children":[{"id":480,"name":"AureliaValidationConfiguration","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Aurelia Validation Configuration API"},"children":[{"id":481,"name":"validatorType","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":666,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":489,"name":"apply","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":490,"name":"apply","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the configuration."},"parameters":[{"id":491,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":676,"character":13}]},{"id":482,"name":"customValidator","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":483,"name":"customValidator","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Use a custom Validator implementation."},"parameters":[{"id":484,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":485,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":486,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":487,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":488,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"__type","id":485}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":670,"character":31}]}],"groups":[{"title":"Constructors","kind":512,"children":[486]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":670,"character":29}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":670,"character":23}]}],"groups":[{"title":"Properties","kind":1024,"children":[481]},{"title":"Methods","kind":2048,"children":[489,482]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":665,"character":47}]},{"id":428,"name":"FluentEnsure","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables targeting properties and objects with rules."},"typeParameter":[{"id":429,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":432,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":433,"name":"new FluentEnsure","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":434,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":215}}],"type":{"type":"reference","name":"FluentEnsure","id":428}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":592,"character":36}]},{"id":430,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":588,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":431,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Rules that have been defined using the fluent API."},"sources":[{"fileName":"aurelia-validation.d.ts","line":592,"character":13}],"type":{"type":"reference","isArray":true,"name":"Rule","id":179,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":444,"name":"assertInitialized","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":445,"name":"assertInitialized","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":608,"character":33}]},{"id":435,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":436,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":437,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":438,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property to target. Can be the property name or a property accessor function.\n"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":210,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":598,"character":14}]},{"id":439,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":440,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":602,"character":20}]},{"id":441,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":442,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a class or object, making them discoverable by the StandardValidator."},"parameters":[{"id":443,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":607,"character":10}]}],"groups":[{"title":"Constructors","kind":512,"children":[432]},{"title":"Properties","kind":1024,"children":[430,431]},{"title":"Methods","kind":2048,"children":[444,435,439,441]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":587,"character":29}]},{"id":285,"name":"FluentRuleCustomizer","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables customizing property rules."},"typeParameter":[{"id":286,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":287,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"indexSignature":[{"id":333,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"comment":{"shortText":"Part of the fluent rule API. Enables customizing property rules."},"type":{"type":"instrinct","name":"any"}}],"children":[{"id":292,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":293,"name":"new FluentRuleCustomizer","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":294,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":175}},{"id":295,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":296,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":297,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":298,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":299,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":426,"character":54}]}}},{"id":300,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":301,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":428,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":302,"name":"fluentRules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}},{"id":303,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":215}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":425,"character":21}]},{"id":288,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":422,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":289,"name":"fluentRules","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":423,"character":27}],"type":{"type":"instrinct","name":"any"}},{"id":290,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":424,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":328,"name":"readonly","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Rules that have been defined using the fluent API."},"sources":[{"fileName":"aurelia-validation.d.ts","line":460,"character":16}],"type":{"type":"instrinct","name":"unknown"},"defaultValue":" rules"},{"id":291,"name":"rule","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":425,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":329,"name":"Rule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":330,"name":"Rule","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":331,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":332,"name":"any","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":460,"character":28}]},{"id":354,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":355,"name":"email","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"email\" rule to the property.\nnull, undefined and empty-string values are considered valid."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":494,"character":13}]},{"id":319,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":320,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":321,"name":"TValue2","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":322,"name":"subject","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reflection","declaration":{"id":323,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":324,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":325,"name":"model","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue2"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":450,"character":41}]}}]}}],"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue2"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":450,"character":14}]},{"id":326,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":327,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":456,"character":20}]},{"id":351,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":352,"name":"matches","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"matches\" rule to the property.\nValue must match the specified regular expression.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":353,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":489,"character":15}]},{"id":365,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":366,"name":"maxItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":367,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":514,"character":16}]},{"id":359,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":360,"name":"maxLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":361,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":504,"character":17}]},{"id":362,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":363,"name":"minItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":364,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":509,"character":16}]},{"id":356,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":357,"name":"minLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":358,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":499,"character":17}]},{"id":334,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":335,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a class or object, making them discoverable by the StandardValidator."},"parameters":[{"id":336,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FluentEnsure","id":428,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":465,"character":10}]},{"id":349,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":350,"name":"required","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"required\" rule to the property.\nThe value cannot be null, undefined or whitespace."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":483,"character":16}]},{"id":337,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":338,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":339,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to validate the rule.\nWill be called with two arguments, the property value and the object.\nShould return a boolean or a Promise that resolves to a boolean.\n"},"type":{"type":"reflection","declaration":{"id":340,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":341,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":342,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":343,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":472,"character":28}]}}},{"id":344,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":472,"character":17}]},{"id":345,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":346,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":347,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":348,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The rule's arguments.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":478,"character":21}]},{"id":316,"name":"tag","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":317,"name":"tag","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Tags the rule instance, enabling the rule to be found easily\nusing ValidationRules.taggedRules(rules, tag)"},"parameters":[{"id":318,"name":"tag","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":445,"character":11}]},{"id":310,"name":"when","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":311,"name":"when","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies a condition that must be met before attempting to validate the rule."},"parameters":[{"id":312,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A function that accepts the object as a parameter and returns true\nor false whether the rule should be evaluated.\n"},"type":{"type":"reflection","declaration":{"id":313,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":314,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":315,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":440,"character":23}]}}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":440,"character":12}]},{"id":307,"name":"withMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":308,"name":"withMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies rule's validation message."},"parameters":[{"id":309,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":434,"character":19}]},{"id":304,"name":"withMessageKey","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":305,"name":"withMessageKey","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies the key to use when looking up the rule's validation message."},"parameters":[{"id":306,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":430,"character":22}]}],"groups":[{"title":"Constructors","kind":512,"children":[292]},{"title":"Properties","kind":1024,"children":[288,289,290,328,291]},{"title":"Methods","kind":2048,"children":[329,354,319,326,351,365,359,362,356,334,349,337,345,316,310,307,304]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":421,"character":37}]},{"id":368,"name":"FluentRules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables applying rules to properties and objects."},"typeParameter":[{"id":369,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":370,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":389,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":390,"name":"new FluentRules","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":391,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":428,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":392,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":215}},{"id":393,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":175}}],"type":{"type":"reference","name":"FluentRules","id":368}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":528,"character":10}]},{"id":371,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":520,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":372,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":521,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":373,"name":"property","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":522,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":374,"name":"customRules","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":523,"character":26}],"type":{"type":"reflection","declaration":{"id":375,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"indexSignature":[{"id":376,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":377,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reflection","declaration":{"id":378,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":385,"name":"argsToConfig","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":526,"character":28}],"type":{"type":"reflection","declaration":{"id":386,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":387,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":388,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":526,"character":30}]}}},{"id":379,"name":"condition","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":525,"character":25}],"type":{"type":"reflection","declaration":{"id":380,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":381,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":382,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":383,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":384,"name":"fluentArgs","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":525,"character":26}]}}}],"groups":[{"title":"Variables","kind":32,"children":[385,379]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":524,"character":27}]}}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":523,"character":27}]}}},{"id":394,"name":"displayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":395,"name":"displayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets the display name of the ensured property."},"parameters":[{"id":396,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":533,"character":19}]},{"id":414,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":415,"name":"email","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"email\" rule to the property.\nnull, undefined and empty-string values are considered valid."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":562,"character":13}]},{"id":411,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":412,"name":"matches","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"matches\" rule to the property.\nValue must match the specified regular expression.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":413,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":557,"character":15}]},{"id":425,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":426,"name":"maxItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":427,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":582,"character":16}]},{"id":419,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":420,"name":"maxLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":421,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":572,"character":17}]},{"id":422,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":423,"name":"minItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":424,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":577,"character":16}]},{"id":416,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":417,"name":"minLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":418,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":567,"character":17}]},{"id":409,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":410,"name":"required","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"required\" rule to the property.\nThe value cannot be null, undefined or whitespace."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":551,"character":16}]},{"id":397,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":398,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":399,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to validate the rule.\nWill be called with two arguments, the property value and the object.\nShould return a boolean or a Promise that resolves to a boolean.\n"},"type":{"type":"reflection","declaration":{"id":400,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":401,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":402,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":403,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":540,"character":28}]}}},{"id":404,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":540,"character":17}]},{"id":405,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":406,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":407,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":408,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The rule's arguments.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":285,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":546,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[389]},{"title":"Properties","kind":1024,"children":[371,372,373,374]},{"title":"Methods","kind":2048,"children":[394,414,411,425,419,422,416,409,397,405]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":519,"character":28}]},{"id":197,"name":"Rules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Sets, unsets and retrieves rules on an object or constructor function."},"children":[{"id":209,"name":"null","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":332,"character":56}],"type":{"type":"instrinct","name":"any"}},{"id":198,"name":"key","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"comment":{"shortText":"The name of the property that stores the rules."},"sources":[{"fileName":"aurelia-validation.d.ts","line":320,"character":18}],"type":{"type":"instrinct","name":"string"}},{"id":206,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":207,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the target's rules."},"parameters":[{"id":208,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"reference","isArray":true,"name":"Rule","id":179,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]},{"type":"reference","name":""}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":332,"character":18}]},{"id":199,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":200,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a target."},"parameters":[{"id":201,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":202,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Rule","id":179,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":324,"character":18}]},{"id":203,"name":"unset","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":204,"name":"unset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes rules from a target."},"parameters":[{"id":205,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":328,"character":20}]}],"groups":[{"title":"Properties","kind":1024,"children":[209,198]},{"title":"Methods","kind":2048,"children":[206,199,203]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":316,"character":22}]},{"id":258,"name":"StandardValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates.\nResponsible for validating objects and properties."},"children":[{"id":262,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":263,"name":"new StandardValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":264,"name":"messageProvider","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationMessageProvider","id":246}},{"id":265,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"StandardValidator","id":258}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":396,"character":32}]},{"id":261,"name":"lookupFunctions","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":396,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":260,"name":"messageProvider","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":395,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":259,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":394,"character":21}],"type":{"type":"instrinct","isArray":true,"name":"any"}},{"id":266,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":267,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":268,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":269,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":270,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":398,"character":26}]},{"id":271,"name":"validate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":272,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":273,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":274,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":275,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":399,"character":24}]},{"id":281,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":282,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":283,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":284,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the rules will be looked up using the metadata\nfor the object created by ValidationRules....on(class/object)\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise"},"overwrites":{"type":"reference","name":"Validator.validateObject","id":21}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":414,"character":22}],"overwrites":{"type":"reference","name":"Validator.validateObject","id":21}},{"id":276,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":277,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":278,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":279,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":280,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the rules will be looked up using the metadata\nfor the object created by ValidationRules....on(class/object)\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise"},"overwrites":{"type":"reference","name":"Validator.validateProperty","id":16}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":407,"character":24}],"overwrites":{"type":"reference","name":"Validator.validateProperty","id":16}}],"groups":[{"title":"Constructors","kind":512,"children":[262]},{"title":"Properties","kind":1024,"children":[261,260,259]},{"title":"Methods","kind":2048,"children":[266,271,281,276]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":393,"character":34}],"extendedTypes":[{"type":"reference","name":"Validator","id":15}]},{"id":107,"name":"ValidateBindingBehavior","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated."},"children":[{"id":110,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":111,"name":"new ValidateBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":112,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehavior","id":107}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":223,"character":42}]},{"id":108,"name":"taskQueue","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":222,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":109,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":223,"character":21}],"type":{"type":"instrinct","isArray":true,"name":"unknown"}},{"id":117,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":118,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":119,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":120,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":121,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":39},{"type":"instrinct","name":"any"}]}},{"id":122,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":232,"character":12}]},{"id":113,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":114,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nwhich is a javascript \"class\" instance, so we need to use the controller to\nlocate the actual DOM element."},"parameters":[{"id":115,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":116,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":231,"character":17}]},{"id":123,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":124,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":125,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":233,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[110]},{"title":"Properties","kind":1024,"children":[108,109]},{"title":"Methods","kind":2048,"children":[117,113,123]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":221,"character":40}]},{"id":39,"name":"ValidationController","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Orchestrates validation.\nManages a set of bindings, renderers and objects.\nExposes the current list of validation errors for binding purposes."},"children":[{"id":50,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":51,"name":"new ValidationController","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":52,"name":"validator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Validator","id":15}}],"type":{"type":"reference","name":"ValidationController","id":39}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":144,"character":33}]},{"id":42,"name":"bindings","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":128,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":46,"name":"elements","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":138,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":44,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Errors that have been rendered by the controller."},"sources":[{"fileName":"aurelia-validation.d.ts","line":133,"character":14}],"type":{"type":"reference","isArray":true,"name":"ValidationError","id":2}},{"id":49,"name":"finishValidating","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":144,"character":32}],"type":{"type":"instrinct","name":"any"}},{"id":47,"name":"objects","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":139,"character":23}],"type":{"type":"instrinct","name":"any"}},{"id":43,"name":"renderers","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":129,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":48,"name":"validateTrigger","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The trigger that will invoke automatic validation of a property used in a binding."},"sources":[{"fileName":"aurelia-validation.d.ts","line":143,"character":23}],"type":{"type":"instrinct","name":"string"}},{"id":45,"name":"validating","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":" Whether the controller is currently validating."},"sources":[{"fileName":"aurelia-validation.d.ts","line":137,"character":18}],"type":{"type":"instrinct","name":"boolean"}},{"id":40,"name":"validator","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":126,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":41,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":127,"character":21}],"type":{"type":"reference","isArray":true,"name":"Validator","id":15}},{"id":60,"name":"addError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":61,"name":"addError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds and renders a ValidationError."},"parameters":[{"id":62,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}},{"id":63,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":64,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"ValidationError","id":2}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":160,"character":16}]},{"id":53,"name":"addObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":54,"name":"addObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an object to the set of objects that should be validated when validate is called."},"parameters":[{"id":55,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object."},"type":{"type":"instrinct","name":"any"}},{"id":56,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. The rules. If rules aren't supplied the Validator implementation will lookup the rules.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":151,"character":17}]},{"id":68,"name":"addRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":69,"name":"addRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a renderer."},"parameters":[{"id":70,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":31}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":169,"character":19}]},{"id":91,"name":"getAssociatedElements","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":92,"name":"getAssociatedElements","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the elements associated with an object and propertyName (if any)."},"parameters":[{"id":93,"name":"__namedParameters","kind":32768,"kindString":"Parameter","flags":{},"originalName":"__0","type":{"type":"reflection","declaration":{"id":94,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":95,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":205,"character":45}],"type":{"type":"instrinct","name":"any"}},{"id":96,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":205,"character":59}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Variables","kind":32,"children":[95,96]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":205,"character":38}]}}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":205,"character":37}]},{"id":82,"name":"getInstructionPredicate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":83,"name":"getInstructionPredicate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Interprets the instruction and returns a predicate that will identify\nrelevant errors in the list of rendered errors."},"parameters":[{"id":84,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":191,"character":39}]},{"id":97,"name":"processErrorDelta","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":98,"name":"processErrorDelta","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":99,"name":"oldErrors","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":100,"name":"newErrors","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":206,"character":33}]},{"id":74,"name":"registerBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":75,"name":"registerBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Registers a binding with the controller."},"parameters":[{"id":76,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance."},"type":{"type":"reference","name":"Binding"}},{"id":77,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The DOM element."},"type":{"type":"reference","name":"Element"}},{"id":78,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"(optional) rules associated with the binding. Validator implementation specific.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":181,"character":23}]},{"id":65,"name":"removeError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":66,"name":"removeError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes and unrenders a ValidationError."},"parameters":[{"id":67,"name":"error","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationError","id":2}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":164,"character":19}]},{"id":57,"name":"removeObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":58,"name":"removeObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes an object from the set of objects that should be validated when validate is called."},"parameters":[{"id":59,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":156,"character":20}]},{"id":71,"name":"removeRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":72,"name":"removeRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes a renderer."},"parameters":[{"id":73,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":31}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":174,"character":22}]},{"id":88,"name":"reset","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":89,"name":"reset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets any rendered errors (unrenders)."},"parameters":[{"id":90,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. Instructions on what to reset. If unspecified all rendered errors will be unrendered.\n"},"type":{"type":"reference","name":"ValidateInstruction","id":35}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":201,"character":13}]},{"id":104,"name":"resetBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":105,"name":"resetBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets the errors for a property associated with a binding."},"parameters":[{"id":106,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":214,"character":20}]},{"id":79,"name":"unregisterBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":80,"name":"unregisterBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Unregisters a binding with the controller."},"parameters":[{"id":81,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance.\n"},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":186,"character":25}]},{"id":85,"name":"validate","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":86,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates and renders errors."},"parameters":[{"id":87,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. Instructions on what to validate. If undefined, all objects and bindings will be validated.\n"},"type":{"type":"reference","name":"ValidateInstruction","id":35}}],"type":{"type":"reference","name":"Promise"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":196,"character":16}]},{"id":101,"name":"validateBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":102,"name":"validateBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the property associated with a binding."},"parameters":[{"id":103,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":210,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[50]},{"title":"Properties","kind":1024,"children":[42,46,44,49,47,43,48,45,40,41]},{"title":"Methods","kind":2048,"children":[60,53,68,91,82,97,74,65,57,71,88,104,79,85,101]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":125,"character":37}]},{"id":126,"name":"ValidationControllerFactory","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Creates ValidationController instances."},"children":[{"id":129,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":130,"name":"new ValidationControllerFactory","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":131,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":126}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":241,"character":42}]},{"id":127,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":240,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":128,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":241,"character":21}],"type":{"type":"instrinct","isArray":true,"name":"unknown"}},{"id":132,"name":"create","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":133,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Creates a new controller and registers it in the current element's container so that it's\navailable to the validate binding behavior and renderers."},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":247,"character":14}]},{"id":134,"name":"createForCurrentScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":135,"name":"createForCurrentScope","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Creates a new controller and registers it in the current element's container so that it's\navailable to the validate binding behavior and renderers."},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":252,"character":29}]}],"groups":[{"title":"Constructors","kind":512,"children":[129]},{"title":"Properties","kind":1024,"children":[127,128]},{"title":"Methods","kind":2048,"children":[132,134]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":44}]},{"id":2,"name":"ValidationError","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A validation error."},"children":[{"id":9,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{},"signatures":[{"id":10,"name":"new ValidationError","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{},"parameters":[{"id":11,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The rule associated with the error. Validator implementation specific."},"type":{"type":"instrinct","name":"any"}},{"id":12,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The error message."},"type":{"type":"instrinct","name":"string"}},{"id":13,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The invalid object"},"type":{"type":"instrinct","name":"any"}},{"id":14,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The name of the invalid property. Optional.\n"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":""}]},"defaultValue":" null"}],"type":{"type":"reference","name":"ValidationError","id":2}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":14,"character":19}]},{"id":8,"name":"id","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"A number that uniquely identifies the error instance."},"sources":[{"fileName":"aurelia-validation.d.ts","line":14,"character":10}],"type":{"type":"instrinct","name":"number"}},{"id":4,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":7,"character":15}],"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":8,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":6,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":9,"character":20}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":""}]},"defaultValue":" null"},{"id":3,"name":"rule","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":6,"character":12}],"type":{"type":"instrinct","name":"any"}},{"id":7,"name":"nextId","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":10,"character":29}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Constructors","kind":512,"children":[9]},{"title":"Properties","kind":1024,"children":[8,4,5,6,3,7]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":5,"character":32}]},{"id":139,"name":"ValidationErrorsCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":145,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":146,"name":"new ValidationErrorsCustomAttribute","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":147,"name":"boundaryElement","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":148,"name":"controllerAccessor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":149,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":150,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"ValidationController","id":39}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":271,"character":65}]}}}],"type":{"type":"reference","name":"ValidationErrorsCustomAttribute","id":139}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":270,"character":32}]},{"id":140,"name":"boundaryElement","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":263,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":141,"name":"controllerAccessor","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":264,"character":34}],"type":{"type":"instrinct","name":"any"}},{"id":144,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":270,"character":14}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":136}},{"id":143,"name":"value","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":13}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":136}},{"id":142,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":265,"character":21}],"type":{"type":"instrinct","isArray":true,"name":"any"}},{"id":159,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":160,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":277,"character":12}]},{"id":153,"name":"interestingElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":154,"name":"interestingElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":155,"name":"elements","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Element"}}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":275,"character":27}]},{"id":156,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":157,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":158,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RenderInstruction","id":28}}],"type":{"type":"instrinct","name":"void"},"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":33}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":276,"character":14}],"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":32}},{"id":151,"name":"sort","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":152,"name":"sort","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":274,"character":12}]},{"id":161,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":162,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[145]},{"title":"Properties","kind":1024,"children":[140,141,144,143,142]},{"title":"Methods","kind":2048,"children":[159,153,156,151,161]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":262,"character":48}],"implementedTypes":[{"type":"reference","name":"ValidationRenderer","id":31}]},{"id":246,"name":"ValidationMessageProvider","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Retrieves validation messages and property display names."},"children":[{"id":249,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":250,"name":"new ValidationMessageProvider","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":251,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":215}}],"type":{"type":"reference","name":"ValidationMessageProvider","id":246}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":370,"character":49}]},{"id":247,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":369,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":248,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":370,"character":21}],"type":{"type":"reference","isArray":true,"name":"ValidationParser","id":215}},{"id":255,"name":"computeDisplayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":256,"name":"computeDisplayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"When a display name is not provided, this method is used to formulate\na display name using the property name.\nOverride this with your own custom logic."},"parameters":[{"id":257,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property name.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":383,"character":26}]},{"id":252,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":253,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns a message binding expression that corresponds to the key."},"parameters":[{"id":254,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message key.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Expression"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":376,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[249]},{"title":"Properties","kind":1024,"children":[247,248]},{"title":"Methods","kind":2048,"children":[255,252]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":368,"character":42}]},{"id":215,"name":"ValidationParser","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":222,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":223,"name":"new ValidationParser","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":224,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Parser"}},{"id":225,"name":"bindinqLanguage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"BindingLanguage"}}],"type":{"type":"reference","name":"ValidationParser","id":215}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":348,"character":36}]},{"id":217,"name":"bindinqLanguage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":344,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":219,"name":"emptyStringExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":346,"character":37}],"type":{"type":"instrinct","name":"any"}},{"id":220,"name":"nullExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":347,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":216,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":343,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":221,"name":"undefinedExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":348,"character":35}],"type":{"type":"instrinct","name":"any"}},{"id":218,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":345,"character":21}],"type":{"type":"instrinct","isArray":true,"name":"any"}},{"id":226,"name":"coalesce","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":227,"name":"coalesce","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":228,"name":"part","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":350,"character":24}]},{"id":235,"name":"getAccessorExpression","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":236,"name":"getAccessorExpression","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":237,"name":"f","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":353,"character":37}]},{"id":232,"name":"getFunctionBody","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":233,"name":"getFunctionBody","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":234,"name":"f","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":352,"character":31}]},{"id":229,"name":"parseMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":230,"name":"parseMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":231,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Expression"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":351,"character":20}]},{"id":238,"name":"parseProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":239,"name":"parseProperty","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":240,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":241,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":242,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":210,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"RuleProperty","id":175}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":354,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[222]},{"title":"Properties","kind":1024,"children":[217,219,220,216,221,218]},{"title":"Methods","kind":2048,"children":[226,235,232,229,238]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":342,"character":33}]},{"id":163,"name":"ValidationRendererCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":164,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":282,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":165,"name":"controller","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":283,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":167,"name":"renderer","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":285,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":166,"name":"value","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":284,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":171,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":172,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":287,"character":12}]},{"id":168,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":169,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":170,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":286,"character":15}]},{"id":173,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":174,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":288,"character":14}]}],"groups":[{"title":"Properties","kind":1024,"children":[164,165,167,166]},{"title":"Methods","kind":2048,"children":[171,168,173]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":281,"character":50}]},{"id":446,"name":"ValidationRules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Fluent rule definition API."},"children":[{"id":447,"name":"parser","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":614,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":459,"name":"customRule","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":460,"name":"customRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines a custom rule."},"parameters":[{"id":461,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom rule. Also serves as the message key."},"type":{"type":"instrinct","name":"string"}},{"id":462,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rule function."},"type":{"type":"reflection","declaration":{"id":463,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":464,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":465,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":466,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":467,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":632,"character":50}]}}},{"id":468,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message expression"},"type":{"type":"instrinct","name":"string"}},{"id":469,"name":"argsToConfig","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A function that maps the rule's arguments to a \"config\" object that can be used when evaluating the message expression.\n"},"type":{"type":"reflection","declaration":{"id":470,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":471,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":472,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":632,"character":156}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":632,"character":25}]},{"id":451,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":452,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":453,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":454,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":455,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property to target. Can be the property name or a property accessor function.\n"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":210,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":620,"character":21}]},{"id":456,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":457,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"typeParameter":[{"id":458,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reference","name":"FluentRules","id":368,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":624,"character":27}]},{"id":448,"name":"initialize","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":449,"name":"initialize","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":450,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":215}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":615,"character":25}]},{"id":477,"name":"off","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":478,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes the rules from a class or object."},"parameters":[{"id":479,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":643,"character":18}]},{"id":473,"name":"taggedRules","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":474,"name":"taggedRules","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns rules with the matching tag."},"parameters":[{"id":475,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":179,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":476,"name":"tag","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The tag to search for.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","isArray":true,"name":"Rule","id":179,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":638,"character":26}]}],"groups":[{"title":"Properties","kind":1024,"children":[447]},{"title":"Methods","kind":2048,"children":[459,451,456,448,477,473]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":613,"character":32}]},{"id":15,"name":"Validator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates.\nResponsible for validating objects and properties."},"children":[{"id":21,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":22,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":23,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":24,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the implementation should lookup the rules for the\nspecified object. This may not be possible for all implementations of this interface.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":43,"character":31}]},{"id":16,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":17,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":18,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":19,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":20,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the implementation should lookup the rules for the\nspecified object. This may not be possible for all implementations of this interface.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":36,"character":33}]}],"groups":[{"title":"Methods","kind":2048,"children":[21,16]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":28,"character":35}],"extendedBy":[{"type":"reference","name":"StandardValidator","id":258}]},{"id":210,"name":"PropertyAccessor","kind":256,"kindString":"Interface","flags":{"isExported":true},"typeParameter":[{"id":211,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":212,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"signatures":[{"id":213,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":214,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":339,"character":37}]},{"id":25,"name":"RenderErrorInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An error to render (or unrender) and the associated elements (if any)"},"children":[{"id":27,"name":"elements","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The associated elements (if any)."},"sources":[{"fileName":"aurelia-validation.d.ts","line":76,"character":16}],"type":{"type":"reference","isArray":true,"name":"Element"}},{"id":26,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The validation error."},"sources":[{"fileName":"aurelia-validation.d.ts","line":72,"character":13}],"type":{"type":"reference","name":"ValidationError","id":2}}],"groups":[{"title":"Properties","kind":1024,"children":[27,26]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":68,"character":43}]},{"id":28,"name":"RenderInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Defines which errors to render and which errors to unrender."},"children":[{"id":29,"name":"render","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The errors to render."},"sources":[{"fileName":"aurelia-validation.d.ts","line":85,"character":14}],"type":{"type":"reference","isArray":true,"name":"RenderErrorInstruction","id":25}},{"id":30,"name":"unrender","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The errors to unrender."},"sources":[{"fileName":"aurelia-validation.d.ts","line":89,"character":16}],"type":{"type":"reference","isArray":true,"name":"RenderErrorInstruction","id":25}}],"groups":[{"title":"Properties","kind":1024,"children":[29,30]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":81,"character":38}]},{"id":136,"name":"RenderedError","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":137,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":259,"character":13}],"type":{"type":"reference","name":"ValidationError","id":2}},{"id":138,"name":"targets","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":260,"character":15}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"groups":[{"title":"Properties","kind":1024,"children":[137,138]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":258,"character":34}]},{"id":179,"name":"Rule","kind":256,"kindString":"Interface","flags":{"isExported":true},"typeParameter":[{"id":180,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":181,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":183,"name":"condition","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":303,"character":17}],"type":{"type":"reflection","declaration":{"id":184,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":185,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":186,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":187,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":303,"character":18}]}}},{"id":188,"name":"config","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":304,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":195,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":309,"character":15}],"type":{"type":"union","types":[{"type":"reference","name":"Expression"},{"type":"reference","name":""}]}},{"id":194,"name":"messageKey","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":308,"character":18}],"type":{"type":"instrinct","name":"string"}},{"id":193,"name":"null","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":307,"character":16},{"fileName":"aurelia-validation.d.ts","line":309,"character":34}],"type":{"type":"instrinct","name":"any"}},{"id":182,"name":"property","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":302,"character":16}],"type":{"type":"reference","name":"RuleProperty","id":175}},{"id":196,"name":"tag","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":310,"character":11}],"type":{"type":"instrinct","name":"string"}},{"id":189,"name":"when","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":305,"character":12}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":190,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":191,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":192,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":305,"character":13}]}},{"type":"reference","name":""}]}}],"groups":[{"title":"Properties","kind":1024,"children":[183,188,195,194,193,182,196,189]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":301,"character":25}]},{"id":175,"name":"RuleProperty","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":178,"name":"displayName","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The displayName of the property (or object)."},"sources":[{"fileName":"aurelia-validation.d.ts","line":299,"character":19}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":""}]}},{"id":176,"name":"name","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The property name. null indicates the rule targets the object itself."},"sources":[{"fileName":"aurelia-validation.d.ts","line":295,"character":12}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":""}]}},{"id":177,"name":"null","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":295,"character":27},{"fileName":"aurelia-validation.d.ts","line":299,"character":34}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Properties","kind":1024,"children":[178,176,177]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":291,"character":33}]},{"id":35,"name":"ValidateInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":36,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The object to validate."},"sources":[{"fileName":"aurelia-validation.d.ts","line":110,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":37,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The property to validate. Optional."},"sources":[{"fileName":"aurelia-validation.d.ts","line":114,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":38,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The rules to validate. Optional."},"sources":[{"fileName":"aurelia-validation.d.ts","line":118,"character":13}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Properties","kind":1024,"children":[36,37,38]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":106,"character":40}]},{"id":243,"name":"ValidationMessages","kind":256,"kindString":"Interface","flags":{"isExported":true},"indexSignature":[{"id":244,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":245,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":358,"character":39}]},{"id":31,"name":"ValidationRenderer","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Renders validation errors."},"children":[{"id":32,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":33,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Render the errors."},"parameters":[{"id":34,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The render instruction. Defines which errors to render and which\nerrors to unrender.\n"},"type":{"type":"reference","name":"RenderInstruction","id":28}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":100,"character":14}]}],"groups":[{"title":"Methods","kind":2048,"children":[32]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":94,"character":39}],"implementedBy":[{"type":"reference","name":"ValidationErrorsCustomAttribute","id":139}]},{"id":492,"name":"validateTrigger","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Validation triggers."},"sources":[{"fileName":"aurelia-validation.d.ts","line":49,"character":32}],"type":{"type":"reflection","declaration":{"id":493,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":494,"name":"blur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":50,"character":12}],"type":{"type":"instrinct","name":"string"}},{"id":495,"name":"change","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":51,"character":14}],"type":{"type":"instrinct","name":"string"}},{"id":496,"name":"manual","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":52,"character":14}],"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Variables","kind":32,"children":[494,495,496]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":49,"character":33}]}}},{"id":507,"name":"validationMessages","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Dictionary of validation messages. [messageKey]: messageExpression"},"sources":[{"fileName":"aurelia-validation.d.ts","line":364,"character":35}],"type":{"type":"reference","name":"ValidationMessages","id":243}},{"id":508,"name":"configure","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":509,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures the plugin."},"parameters":[{"id":510,"name":"frameworkConfig","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":511,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":512,"name":"container","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":682,"character":17}],"type":{"type":"reference","name":"Container"}},{"id":513,"name":"globalResources","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":683,"character":23}],"type":{"type":"reflection","declaration":{"id":514,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":515,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":516,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"string"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":683,"character":24}]}}}],"groups":[{"title":"Variables","kind":32,"children":[512,513]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":681,"character":46}]}}},{"id":517,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":518,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":519,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":520,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AureliaValidationConfiguration","id":480}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":684,"character":17}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":681,"character":29}]},{"id":497,"name":"getPropertyInfo","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":498,"name":"getPropertyInfo","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the object and property name for the specified expression."},"parameters":[{"id":499,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The expression"},"type":{"type":"reference","name":"Expression"}},{"id":500,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The scope\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reflection","declaration":{"id":501,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":502,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":61,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":503,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":62,"character":20}],"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Variables","kind":32,"children":[502,503]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":60,"character":73}]}}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":60,"character":35}]},{"id":504,"name":"isString","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":505,"name":"isString","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":506,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":335,"character":28}]}],"groups":[{"title":"Classes","kind":128,"children":[480,428,285,368,197,258,107,39,126,2,139,246,215,163,446,15]},{"title":"Interfaces","kind":256,"children":[210,25,28,136,179,175,35,243,31]},{"title":"Variables","kind":32,"children":[492,507]},{"title":"Functions","kind":64,"children":[508,497,504]}]} +{"name":"aurelia-validation","children":[{"id":625,"name":"AureliaValidationConfiguration","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Aurelia Validation Configuration API"},"children":[{"id":626,"name":"validatorType","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":776,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":634,"name":"apply","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":635,"name":"apply","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the configuration."},"parameters":[{"id":636,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":786,"character":13}]},{"id":627,"name":"customValidator","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":628,"name":"customValidator","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Use a custom Validator implementation."},"parameters":[{"id":629,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":630,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":631,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":632,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":633,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"__type","id":630}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":780,"character":31}]}],"groups":[{"title":"Constructors","kind":512,"children":[631]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":780,"character":29}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":780,"character":23}]}],"groups":[{"title":"Properties","kind":1024,"children":[626]},{"title":"Methods","kind":2048,"children":[634,627]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":775,"character":47}]},{"id":569,"name":"FluentEnsure","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables targeting properties and objects with rules."},"typeParameter":[{"id":570,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":574,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":575,"name":"new FluentEnsure","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":576,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":332}}],"type":{"type":"reference","name":"FluentEnsure","id":569}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":696,"character":26}]},{"id":573,"name":"_sequence","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":696,"character":17}],"type":{"type":"instrinct","name":"number"}},{"id":571,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":691,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":572,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Rules that have been defined using the fluent API."},"sources":[{"fileName":"aurelia-validation.d.ts","line":695,"character":13}],"type":{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":586,"name":"_addRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":587,"name":"_addRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a rule definition to the sequenced ruleset."},"parameters":[{"id":588,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Rule","id":297,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":716,"character":16}]},{"id":589,"name":"assertInitialized","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":590,"name":"assertInitialized","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":717,"character":33}]},{"id":577,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":578,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":579,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":580,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property to target. Can be the property name or a property accessor\nfunction.\n"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":327,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":703,"character":14}]},{"id":581,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":582,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":707,"character":20}]},{"id":583,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":584,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a class or object, making them discoverable by the StandardValidator."},"parameters":[{"id":585,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":712,"character":10}]}],"groups":[{"title":"Constructors","kind":512,"children":[574]},{"title":"Properties","kind":1024,"children":[573,571,572]},{"title":"Methods","kind":2048,"children":[586,589,577,581,583]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":690,"character":29}]},{"id":423,"name":"FluentRuleCustomizer","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables customizing property rules."},"typeParameter":[{"id":424,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":425,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":430,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":431,"name":"new FluentRuleCustomizer","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":432,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":294}},{"id":433,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":434,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":435,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":436,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":437,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"boolean"}]}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":513,"character":54}]}}},{"id":438,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":439,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":569,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":440,"name":"fluentRules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}},{"id":441,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":332}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":512,"character":21}]},{"id":426,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":509,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":427,"name":"fluentRules","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":510,"character":27}],"type":{"type":"instrinct","name":"any"}},{"id":428,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":511,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":429,"name":"rule","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":512,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":468,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Rules that have been defined using the fluent API."},"sources":[{"fileName":"aurelia-validation.d.ts","line":553,"character":22}],"type":{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":489,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":490,"name":"email","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"email\" rule to the property.\nnull, undefined and empty-string values are considered valid."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":587,"character":13}]},{"id":459,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":460,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":461,"name":"TValue2","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":462,"name":"subject","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reflection","declaration":{"id":463,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":464,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":465,"name":"model","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue2"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":543,"character":41}]}}]}}],"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue2"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":543,"character":14}]},{"id":466,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":467,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":549,"character":20}]},{"id":503,"name":"equals","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":504,"name":"equals","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"equals\" validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":505,"name":"expectedValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":612,"character":14}]},{"id":486,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":487,"name":"matches","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"matches\" rule to the property.\nValue must match the specified regular expression.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":488,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":582,"character":15}]},{"id":500,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":501,"name":"maxItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":502,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":607,"character":16}]},{"id":494,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":495,"name":"maxLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":496,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":597,"character":17}]},{"id":497,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":498,"name":"minItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":499,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":602,"character":16}]},{"id":491,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":492,"name":"minLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":493,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":592,"character":17}]},{"id":469,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":470,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a class or object, making them discoverable by the StandardValidator."},"parameters":[{"id":471,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"FluentEnsure","id":569,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":558,"character":10}]},{"id":484,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":485,"name":"required","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"required\" rule to the property.\nThe value cannot be null, undefined or whitespace."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":576,"character":16}]},{"id":472,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":473,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":474,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to validate the rule.\nWill be called with two arguments, the property value and the object.\nShould return a boolean or a Promise that resolves to a boolean.\n"},"type":{"type":"reflection","declaration":{"id":475,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":476,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":477,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":478,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"boolean"}]}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":565,"character":28}]}}},{"id":479,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":565,"character":17}]},{"id":480,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":481,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":482,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":483,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The rule's arguments.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":571,"character":21}]},{"id":456,"name":"tag","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":457,"name":"tag","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Tags the rule instance, enabling the rule to be found easily\nusing ValidationRules.taggedRules(rules, tag)"},"parameters":[{"id":458,"name":"tag","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":538,"character":11}]},{"id":442,"name":"then","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":443,"name":"then","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validate subsequent rules after previously declared rules have\nbeen validated successfully. Use to postpone validation of costly\nrules until less expensive rules pass validation."}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":519,"character":12}]},{"id":450,"name":"when","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":451,"name":"when","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies a condition that must be met before attempting to validate the rule."},"parameters":[{"id":452,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A function that accepts the object as a parameter and returns true\nor false whether the rule should be evaluated.\n"},"type":{"type":"reflection","declaration":{"id":453,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":454,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":455,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":533,"character":23}]}}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":533,"character":12}]},{"id":447,"name":"withMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":448,"name":"withMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies rule's validation message."},"parameters":[{"id":449,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":527,"character":19}]},{"id":444,"name":"withMessageKey","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":445,"name":"withMessageKey","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies the key to use when looking up the rule's validation message."},"parameters":[{"id":446,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":523,"character":22}]}],"groups":[{"title":"Constructors","kind":512,"children":[430]},{"title":"Properties","kind":1024,"children":[426,427,428,429,468]},{"title":"Methods","kind":2048,"children":[489,459,466,503,486,500,494,497,491,469,484,472,480,456,442,450,447,444]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":508,"character":37}]},{"id":506,"name":"FluentRules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables applying rules to properties and objects."},"typeParameter":[{"id":507,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":508,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":527,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":528,"name":"new FluentRules","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":529,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":569,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":530,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":332}},{"id":531,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":294}}],"type":{"type":"reference","name":"FluentRules","id":506}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":626,"character":10}]},{"id":509,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":618,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":510,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":619,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":511,"name":"property","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":620,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":512,"name":"customRules","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":621,"character":26}],"type":{"type":"reflection","declaration":{"id":513,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"indexSignature":[{"id":514,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":515,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reflection","declaration":{"id":516,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":523,"name":"argsToConfig","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":624,"character":28}],"type":{"type":"reflection","declaration":{"id":524,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":525,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":526,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":624,"character":30}]}}},{"id":517,"name":"condition","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":623,"character":25}],"type":{"type":"reflection","declaration":{"id":518,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":519,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":520,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":521,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":522,"name":"fluentArgs","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"boolean"}]}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":623,"character":26}]}}}],"groups":[{"title":"Variables","kind":32,"children":[523,517]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":622,"character":27}]}}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":621,"character":27}]}}},{"id":532,"name":"displayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":533,"name":"displayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets the display name of the ensured property."},"parameters":[{"id":534,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":631,"character":19}]},{"id":552,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":553,"name":"email","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"email\" rule to the property.\nnull, undefined and empty-string values are considered valid."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":660,"character":13}]},{"id":566,"name":"equals","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":567,"name":"equals","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"equals\" validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":568,"name":"expectedValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":685,"character":14}]},{"id":549,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":550,"name":"matches","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"matches\" rule to the property.\nValue must match the specified regular expression.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":551,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":655,"character":15}]},{"id":563,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":564,"name":"maxItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":565,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":680,"character":16}]},{"id":557,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":558,"name":"maxLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"maxLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":559,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":670,"character":17}]},{"id":560,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":561,"name":"minItems","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minItems\" ARRAY validation rule to the property.\nnull and undefined values are considered valid."},"parameters":[{"id":562,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":675,"character":16}]},{"id":554,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":555,"name":"minLength","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"minLength\" STRING validation rule to the property.\nnull, undefined and empty-string values are considered valid."},"parameters":[{"id":556,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":665,"character":17}]},{"id":547,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":548,"name":"required","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the \"required\" rule to the property.\nThe value cannot be null, undefined or whitespace."},"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":649,"character":16}]},{"id":535,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":536,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":537,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The function to validate the rule.\nWill be called with two arguments, the property value and the object.\nShould return a boolean or a Promise that resolves to a boolean.\n"},"type":{"type":"reflection","declaration":{"id":538,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":539,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":540,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":541,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"boolean"}]}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":638,"character":28}]}}},{"id":542,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":638,"character":17}]},{"id":543,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":544,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":545,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":546,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"text":"The rule's arguments.\n"},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":423,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":644,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[527]},{"title":"Properties","kind":1024,"children":[509,510,511,512]},{"title":"Methods","kind":2048,"children":[532,552,566,549,563,557,560,554,547,535,543]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":617,"character":28}]},{"id":358,"name":"MessageExpressionValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":364,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":365,"name":"new MessageExpressionValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":366,"name":"originalMessage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"MessageExpressionValidator","id":358},"overwrites":{"type":"reference","name":"Unparser.__constructor"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":430,"character":79}],"overwrites":{"type":"reference","name":"Unparser.__constructor"}},{"id":359,"name":"originalMessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":429,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":367,"name":"visitAccessScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":368,"name":"visitAccessScope","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":369,"name":"access","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AccessScope"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":432,"character":24}]},{"id":360,"name":"validate","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":361,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":362,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Expression"}},{"id":363,"name":"originalMessage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":430,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[364]},{"title":"Properties","kind":1024,"children":[359]},{"title":"Methods","kind":2048,"children":[367,360]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":428,"character":43}],"extendedTypes":[{"type":"reference","name":"Unparser"}],"implementedTypes":[{"type":"reference","name":"ExpressionVisitor"}]},{"id":315,"name":"Rules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Sets, unsets and retrieves rules on an object or constructor function."},"children":[{"id":316,"name":"key","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"comment":{"shortText":"The name of the property that stores the rules."},"sources":[{"fileName":"aurelia-validation.d.ts","line":392,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":324,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":325,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the target's rules."},"parameters":[{"id":326,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":404,"character":18}]},{"id":317,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":318,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a target."},"parameters":[{"id":319,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":320,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":396,"character":18}]},{"id":321,"name":"unset","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":322,"name":"unset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes rules from a target."},"parameters":[{"id":323,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":400,"character":20}]}],"groups":[{"title":"Properties","kind":1024,"children":[316]},{"title":"Methods","kind":2048,"children":[324,317,321]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":388,"character":22}]},{"id":385,"name":"StandardValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates.\nResponsible for validating objects and properties."},"children":[{"id":390,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":391,"name":"new StandardValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":392,"name":"messageProvider","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationMessageProvider","id":373}},{"id":393,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"StandardValidator","id":385}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":476,"character":31}]},{"id":389,"name":"getDisplayName","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":476,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":388,"name":"lookupFunctions","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":475,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":387,"name":"messageProvider","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":474,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":386,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":473,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reference","name":"ValidationMessageProvider","id":373},{"type":"reference","name":"ViewResources"}]}},{"id":407,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":408,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":409,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":410,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":411,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":499,"character":26}]},{"id":403,"name":"ruleExists","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":404,"name":"ruleExists","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Determines whether a rule exists in a set of rules.","tags":[{"tag":"parem","text":"rule The rule to find.\n"}]},"parameters":[{"id":405,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":406,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Rule","id":297,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"boolean"},"overwrites":{"type":"reference","name":"Validator.ruleExists","id":27}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":498,"character":18}],"overwrites":{"type":"reference","name":"Validator.ruleExists","id":27}},{"id":418,"name":"validate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":419,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":420,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":421,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":422,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":501,"character":24}]},{"id":399,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":400,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":401,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":402,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the rules will be looked up using the metadata\nfor the object created by ValidationRules....on(class/object)\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","isArray":true,"name":"ValidationError","id":2}]},"overwrites":{"type":"reference","name":"Validator.validateObject","id":23}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":492,"character":22}],"overwrites":{"type":"reference","name":"Validator.validateObject","id":23}},{"id":394,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":395,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":396,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":397,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":398,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the rules will be looked up using the metadata\nfor the object created by ValidationRules....on(class/object)\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","isArray":true,"name":"ValidationError","id":2}]},"overwrites":{"type":"reference","name":"Validator.validateProperty","id":18}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":485,"character":24}],"overwrites":{"type":"reference","name":"Validator.validateProperty","id":18}},{"id":412,"name":"validateRuleSequence","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":413,"name":"validateRuleSequence","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":414,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":415,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":416,"name":"ruleSequence","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":417,"name":"sequence","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":500,"character":36}]}],"groups":[{"title":"Constructors","kind":512,"children":[390]},{"title":"Properties","kind":1024,"children":[389,388,387,386]},{"title":"Methods","kind":2048,"children":[407,403,418,399,394,412]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":472,"character":34}],"extendedTypes":[{"type":"reference","name":"Validator","id":17}]},{"id":136,"name":"ValidateBindingBehavior","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated\nwhen the validate trigger specified by the associated controller's\nvalidateTrigger property occurs."},"children":[{"id":141,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":142,"name":"new ValidateBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":143,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehavior","id":136},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}},{"id":137,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":261,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":148,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":149,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":150,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":151,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":152,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":46},{"type":"instrinct","name":"any"}]}},{"id":153,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":249,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}},{"id":144,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":145,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nor custom attribute which is a javascript \"class\" instance, so we need to use\nthe controller's container to retrieve the actual DOM element."},"parameters":[{"id":146,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":147,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}},{"id":138,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":139,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":140,"name":"controller","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationController","id":46}}],"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":262,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}},{"id":154,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":155,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":156,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":250,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"groups":[{"title":"Constructors","kind":512,"children":[141]},{"title":"Properties","kind":1024,"children":[137]},{"title":"Methods","kind":2048,"children":[148,144,138,154]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":260,"character":40}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":115}]},{"id":115,"name":"ValidateBindingBehaviorBase","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated."},"children":[{"id":117,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":118,"name":"new ValidateBindingBehaviorBase","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":119,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehaviorBase","id":115}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":26}]},{"id":116,"name":"taskQueue","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":127,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":128,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":129,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":130,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":131,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":46},{"type":"instrinct","name":"any"}]}},{"id":132,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":249,"character":12}]},{"id":123,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":124,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nor custom attribute which is a javascript \"class\" instance, so we need to use\nthe controller's container to retrieve the actual DOM element."},"parameters":[{"id":125,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":126,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":17}]},{"id":120,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true,"isProtected":true},"signatures":[{"id":121,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":122,"name":"controller","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationController","id":46}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":241,"character":45}]},{"id":133,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":134,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":135,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":250,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[117]},{"title":"Properties","kind":1024,"children":[116]},{"title":"Methods","kind":2048,"children":[127,123,120,133]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":238,"character":53}],"extendedBy":[{"type":"reference","name":"ValidateBindingBehavior","id":136},{"type":"reference","name":"ValidateManuallyBindingBehavior","id":157},{"type":"reference","name":"ValidateOnBlurBindingBehavior","id":177},{"type":"reference","name":"ValidateOnChangeBindingBehavior","id":197},{"type":"reference","name":"ValidateOnChangeOrBlurBindingBehavior","id":217}]},{"id":157,"name":"ValidateManuallyBindingBehavior","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property will be validated\nmanually, by calling controller.validate(). No automatic validation\ntriggered by data-entry or blur will occur."},"children":[{"id":161,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":162,"name":"new ValidateManuallyBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":163,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateManuallyBindingBehavior","id":157},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}},{"id":158,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":270,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":168,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":169,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":170,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":171,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":172,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":46},{"type":"instrinct","name":"any"}]}},{"id":173,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":249,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}},{"id":164,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":165,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nor custom attribute which is a javascript \"class\" instance, so we need to use\nthe controller's container to retrieve the actual DOM element."},"parameters":[{"id":166,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":167,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}},{"id":159,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":160,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":271,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}},{"id":174,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":175,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":176,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":250,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"groups":[{"title":"Constructors","kind":512,"children":[161]},{"title":"Properties","kind":1024,"children":[158]},{"title":"Methods","kind":2048,"children":[168,164,159,174]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":48}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":115}]},{"id":177,"name":"ValidateOnBlurBindingBehavior","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated\nwhen the associated element blurs."},"children":[{"id":181,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":182,"name":"new ValidateOnBlurBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":183,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnBlurBindingBehavior","id":177},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}},{"id":178,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":188,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":189,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":190,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":191,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":192,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":46},{"type":"instrinct","name":"any"}]}},{"id":193,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":249,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}},{"id":184,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":185,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nor custom attribute which is a javascript \"class\" instance, so we need to use\nthe controller's container to retrieve the actual DOM element."},"parameters":[{"id":186,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":187,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}},{"id":179,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":180,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":279,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}},{"id":194,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":195,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":196,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":250,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"groups":[{"title":"Constructors","kind":512,"children":[181]},{"title":"Properties","kind":1024,"children":[178]},{"title":"Methods","kind":2048,"children":[188,184,179,194]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":277,"character":46}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":115}]},{"id":197,"name":"ValidateOnChangeBindingBehavior","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated\nwhen the associated element is changed by the user, causing a change\nto the model."},"children":[{"id":201,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":202,"name":"new ValidateOnChangeBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":203,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnChangeBindingBehavior","id":197},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}},{"id":198,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":287,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":208,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":209,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":210,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":211,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":212,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":46},{"type":"instrinct","name":"any"}]}},{"id":213,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":249,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}},{"id":204,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":205,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nor custom attribute which is a javascript \"class\" instance, so we need to use\nthe controller's container to retrieve the actual DOM element."},"parameters":[{"id":206,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":207,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}},{"id":199,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":200,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":288,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}},{"id":214,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":215,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":216,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":250,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"groups":[{"title":"Constructors","kind":512,"children":[201]},{"title":"Properties","kind":1024,"children":[198]},{"title":"Methods","kind":2048,"children":[208,204,199,214]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":286,"character":48}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":115}]},{"id":217,"name":"ValidateOnChangeOrBlurBindingBehavior","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated\nwhen the associated element blurs or is changed by the user, causing\na change to the model."},"children":[{"id":221,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":222,"name":"new ValidateOnChangeOrBlurBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":223,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnChangeOrBlurBindingBehavior","id":217},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":239,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":117}},{"id":218,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":296,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":228,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":229,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":230,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":231,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":232,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":46},{"type":"instrinct","name":"any"}]}},{"id":233,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":249,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":127}},{"id":224,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":225,"name":"getTarget","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the DOM element associated with the data-binding. Most of the time it's\nthe binding.target but sometimes binding.target is an aurelia custom element,\nor custom attribute which is a javascript \"class\" instance, so we need to use\nthe controller's container to retrieve the actual DOM element."},"parameters":[{"id":226,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":227,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":123}},{"id":219,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":220,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":297,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":120}},{"id":234,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":235,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":236,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":250,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":133}}],"groups":[{"title":"Constructors","kind":512,"children":[221]},{"title":"Properties","kind":1024,"children":[218]},{"title":"Methods","kind":2048,"children":[228,224,219,234]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":295,"character":54}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":115}]},{"id":46,"name":"ValidationController","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Orchestrates validation.\nManages a set of bindings, renderers and objects.\nExposes the current list of validation errors for binding purposes."},"children":[{"id":57,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":58,"name":"new ValidationController","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":59,"name":"validator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Validator","id":17}}],"type":{"type":"reference","name":"ValidationController","id":46}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":160,"character":33}]},{"id":49,"name":"bindings","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":144,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":53,"name":"elements","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":154,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":51,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Errors that have been rendered by the controller."},"sources":[{"fileName":"aurelia-validation.d.ts","line":149,"character":14}],"type":{"type":"reference","isArray":true,"name":"ValidationError","id":2}},{"id":56,"name":"finishValidating","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":160,"character":32}],"type":{"type":"instrinct","name":"any"}},{"id":54,"name":"objects","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":155,"character":23}],"type":{"type":"instrinct","name":"any"}},{"id":50,"name":"renderers","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":145,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":55,"name":"validateTrigger","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The trigger that will invoke automatic validation of a property used in a binding."},"sources":[{"fileName":"aurelia-validation.d.ts","line":159,"character":23}],"type":{"type":"instrinct","name":"number"}},{"id":52,"name":"validating","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":" Whether the controller is currently validating."},"sources":[{"fileName":"aurelia-validation.d.ts","line":153,"character":18}],"type":{"type":"instrinct","name":"boolean"}},{"id":47,"name":"validator","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":142,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":48,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":143,"character":21}],"type":{"type":"reference","isArray":true,"name":"Validator","id":17}},{"id":67,"name":"addError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":68,"name":"addError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds and renders a ValidationError."},"parameters":[{"id":69,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}},{"id":70,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":71,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"ValidationError","id":2}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":176,"character":16}]},{"id":60,"name":"addObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":61,"name":"addObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds an object to the set of objects that should be validated when validate is called."},"parameters":[{"id":62,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object."},"type":{"type":"instrinct","name":"any"}},{"id":63,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. The rules. If rules aren't supplied the Validator implementation will lookup the rules.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":167,"character":17}]},{"id":75,"name":"addRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":76,"name":"addRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a renderer."},"parameters":[{"id":77,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":38}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":185,"character":19}]},{"id":98,"name":"getAssociatedElements","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":99,"name":"getAssociatedElements","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the elements associated with an object and propertyName (if any)."},"parameters":[{"id":100,"name":"__namedParameters","kind":32768,"kindString":"Parameter","flags":{},"originalName":"__0","type":{"type":"reflection","declaration":{"id":101,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":102,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":222,"character":45}],"type":{"type":"instrinct","name":"any"}},{"id":103,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":222,"character":59}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Variables","kind":32,"children":[102,103]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":222,"character":38}]}}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":222,"character":37}]},{"id":89,"name":"getInstructionPredicate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":90,"name":"getInstructionPredicate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Interprets the instruction and returns a predicate that will identify\nrelevant errors in the list of rendered errors."},"parameters":[{"id":91,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":207,"character":39}]},{"id":104,"name":"processErrorDelta","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":105,"name":"processErrorDelta","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":106,"name":"kind","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":107,"name":"oldErrors","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":108,"name":"newErrors","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":223,"character":33}]},{"id":81,"name":"registerBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":82,"name":"registerBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Registers a binding with the controller."},"parameters":[{"id":83,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance."},"type":{"type":"reference","name":"Binding"}},{"id":84,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The DOM element."},"type":{"type":"reference","name":"Element"}},{"id":85,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"(optional) rules associated with the binding. Validator implementation specific.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":197,"character":23}]},{"id":72,"name":"removeError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":73,"name":"removeError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes and unrenders a ValidationError."},"parameters":[{"id":74,"name":"error","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationError","id":2}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":180,"character":19}]},{"id":64,"name":"removeObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":65,"name":"removeObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes an object from the set of objects that should be validated when validate is called."},"parameters":[{"id":66,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":172,"character":20}]},{"id":78,"name":"removeRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":79,"name":"removeRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes a renderer."},"parameters":[{"id":80,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":38}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":190,"character":22}]},{"id":95,"name":"reset","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":96,"name":"reset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets any rendered errors (unrenders)."},"parameters":[{"id":97,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. Instructions on what to reset. If unspecified all rendered errors will be unrendered.\n"},"type":{"type":"reference","name":"ValidateInstruction","id":42}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":218,"character":13}]},{"id":112,"name":"resetBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":113,"name":"resetBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets the errors for a property associated with a binding."},"parameters":[{"id":114,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":231,"character":20}]},{"id":86,"name":"unregisterBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":87,"name":"unregisterBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Unregisters a binding with the controller."},"parameters":[{"id":88,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance.\n"},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":202,"character":25}]},{"id":92,"name":"validate","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":93,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates and renders errors."},"parameters":[{"id":94,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. Instructions on what to validate. If undefined, all\nobjects and bindings will be validated.\n"},"type":{"type":"reference","name":"ValidateInstruction","id":42}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","isArray":true,"name":"ValidationError","id":2}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":213,"character":16}]},{"id":109,"name":"validateBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":110,"name":"validateBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the property associated with a binding."},"parameters":[{"id":111,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":227,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[57]},{"title":"Properties","kind":1024,"children":[49,53,51,56,54,50,55,52,47,48]},{"title":"Methods","kind":2048,"children":[67,60,75,98,89,104,81,72,64,78,95,112,86,92,109]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":141,"character":37}]},{"id":237,"name":"ValidationControllerFactory","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Creates ValidationController instances."},"children":[{"id":242,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":243,"name":"new ValidationControllerFactory","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":244,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":237}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":307,"character":70}]},{"id":238,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":306,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":245,"name":"create","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":246,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Creates a new controller instance."},"parameters":[{"id":247,"name":"validator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Validator","id":17}}],"type":{"type":"reference","name":"ValidationController","id":46}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":312,"character":14}]},{"id":248,"name":"createForCurrentScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":249,"name":"createForCurrentScope","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Creates a new controller and registers it in the current element's container so that it's\navailable to the validate binding behavior and renderers."},"parameters":[{"id":250,"name":"validator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Validator","id":17}}],"type":{"type":"reference","name":"ValidationController","id":46}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":317,"character":29}]},{"id":239,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":240,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":241,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":237}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":307,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[242]},{"title":"Properties","kind":1024,"children":[238]},{"title":"Methods","kind":2048,"children":[245,248,239]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":305,"character":44}]},{"id":2,"name":"ValidationError","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A validation error."},"children":[{"id":9,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{},"signatures":[{"id":10,"name":"new ValidationError","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{},"parameters":[{"id":11,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The rule associated with the error. Validator implementation specific."},"type":{"type":"instrinct","name":"any"}},{"id":12,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The error message."},"type":{"type":"instrinct","name":"string"}},{"id":13,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The invalid object"},"type":{"type":"instrinct","name":"any"}},{"id":14,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The name of the invalid property. Optional.\n"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"type":{"type":"reference","name":"ValidationError","id":2}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":18,"character":19}]},{"id":8,"name":"id","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"A number that uniquely identifies the error instance."},"sources":[{"fileName":"aurelia-validation.d.ts","line":18,"character":10}],"type":{"type":"instrinct","name":"number"}},{"id":4,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":11,"character":15}],"type":{"type":"instrinct","name":"string"}},{"id":5,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":12,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":6,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":13,"character":20}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":3,"name":"rule","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":10,"character":12}],"type":{"type":"instrinct","name":"any"}},{"id":7,"name":"nextId","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":14,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":15,"name":"toString","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":16,"name":"toString","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":26,"character":16}]}],"groups":[{"title":"Constructors","kind":512,"children":[9]},{"title":"Properties","kind":1024,"children":[8,4,5,6,3,7]},{"title":"Methods","kind":2048,"children":[15]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":9,"character":32}]},{"id":254,"name":"ValidationErrorsCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":264,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":265,"name":"new ValidationErrorsCustomAttribute","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":266,"name":"boundaryElement","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":267,"name":"controllerAccessor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":268,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":269,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"ValidationController","id":46}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":336,"character":65}]}}}],"type":{"type":"reference","name":"ValidationErrorsCustomAttribute","id":254}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":335,"character":32}]},{"id":255,"name":"boundaryElement","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":328,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":256,"name":"controllerAccessor","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":329,"character":34}],"type":{"type":"instrinct","name":"any"}},{"id":263,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":335,"character":14}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":251}},{"id":262,"name":"value","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":334,"character":13}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":251}},{"id":257,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":330,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reflection","declaration":{"id":258,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":259,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":260,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"__type","id":258}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":330,"character":25}]},{"id":261,"name":"prototype","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":332,"character":21}],"type":{"type":"reference","name":"Element"}}],"groups":[{"title":"Constructors","kind":512,"children":[259]},{"title":"Variables","kind":32,"children":[261]}]}},{"type":"reference","name":"Lazy"}]}},{"id":278,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":279,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":342,"character":12}]},{"id":272,"name":"interestingElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":273,"name":"interestingElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":274,"name":"elements","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Element"}}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":340,"character":27}]},{"id":275,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":276,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":277,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RenderInstruction","id":34}}],"type":{"type":"instrinct","name":"void"},"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":40}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":341,"character":14}],"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":39}},{"id":270,"name":"sort","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":271,"name":"sort","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":339,"character":12}]},{"id":280,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":281,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":343,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[264]},{"title":"Properties","kind":1024,"children":[255,256,263,262,257]},{"title":"Methods","kind":2048,"children":[278,272,275,270,280]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":327,"character":48}],"implementedTypes":[{"type":"reference","name":"ValidationRenderer","id":38}]},{"id":373,"name":"ValidationMessageProvider","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Retrieves validation messages and property display names."},"children":[{"id":376,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":377,"name":"new ValidationMessageProvider","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":378,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":332}}],"type":{"type":"reference","name":"ValidationMessageProvider","id":373}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":448,"character":49}]},{"id":374,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":447,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":375,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":448,"character":21}],"type":{"type":"reference","isArray":true,"name":"ValidationParser","id":332}},{"id":382,"name":"getDisplayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":383,"name":"getDisplayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"When a display name is not provided, this method is used to formulate\na display name using the property name.\nOverride this with your own custom logic."},"parameters":[{"id":384,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property name.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":461,"character":22}]},{"id":379,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":380,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns a message binding expression that corresponds to the key."},"parameters":[{"id":381,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message key.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Expression"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":454,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[376]},{"title":"Properties","kind":1024,"children":[374,375]},{"title":"Methods","kind":2048,"children":[382,379]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":446,"character":42}]},{"id":332,"name":"ValidationParser","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":340,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":341,"name":"new ValidationParser","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":342,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Parser"}},{"id":343,"name":"bindinqLanguage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"BindingLanguage"}}],"type":{"type":"reference","name":"ValidationParser","id":332}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":421,"character":22}]},{"id":334,"name":"bindinqLanguage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":416,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":339,"name":"cache","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":421,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":336,"name":"emptyStringExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":418,"character":37}],"type":{"type":"instrinct","name":"any"}},{"id":337,"name":"nullExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":419,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":333,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":415,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":338,"name":"undefinedExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":420,"character":35}],"type":{"type":"instrinct","name":"any"}},{"id":335,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":417,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reference","name":"Parser"},{"type":"reference","name":"BindingLanguage"}]}},{"id":352,"name":"coalesce","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":353,"name":"coalesce","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":354,"name":"part","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":425,"character":24}]},{"id":355,"name":"getAccessorExpression","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":356,"name":"getAccessorExpression","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":357,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":426,"character":37}]},{"id":344,"name":"parseMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":345,"name":"parseMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":346,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Expression"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":423,"character":20}]},{"id":347,"name":"parseProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":348,"name":"parseProperty","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":349,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":350,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":351,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":327,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"RuleProperty","id":294}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":424,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[340]},{"title":"Properties","kind":1024,"children":[334,339,336,337,333,338,335]},{"title":"Methods","kind":2048,"children":[352,355,344,347]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":414,"character":33}]},{"id":282,"name":"ValidationRendererCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":283,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":347,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":284,"name":"controller","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":348,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":286,"name":"renderer","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":350,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":285,"name":"value","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":349,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":290,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":291,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":352,"character":12}]},{"id":287,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":288,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":289,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":351,"character":15}]},{"id":292,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":293,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":353,"character":14}]}],"groups":[{"title":"Properties","kind":1024,"children":[283,284,286,285]},{"title":"Methods","kind":2048,"children":[290,287,292]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":346,"character":50}]},{"id":591,"name":"ValidationRules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Fluent rule definition API."},"children":[{"id":592,"name":"parser","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":723,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":604,"name":"customRule","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":605,"name":"customRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines a custom rule."},"parameters":[{"id":606,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom rule. Also serves as the message key."},"type":{"type":"instrinct","name":"string"}},{"id":607,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rule function."},"type":{"type":"reflection","declaration":{"id":608,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":609,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":610,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":611,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":612,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"boolean"}]}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":742,"character":50}]}}},{"id":613,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message expression"},"type":{"type":"instrinct","name":"string"}},{"id":614,"name":"argsToConfig","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"A function that maps the rule's arguments to a \"config\"\nobject that can be used when evaluating the message expression.\n"},"type":{"type":"reflection","declaration":{"id":615,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":616,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":617,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":742,"character":156}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":742,"character":25}]},{"id":596,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":597,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":598,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":599,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":600,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property to target. Can be the property name or a property accessor function.\n"},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":327,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":729,"character":21}]},{"id":601,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":602,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"typeParameter":[{"id":603,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reference","name":"FluentRules","id":506,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":733,"character":27}]},{"id":593,"name":"initialize","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":594,"name":"initialize","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":595,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":332}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":724,"character":25}]},{"id":622,"name":"off","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":623,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes the rules from a class or object."},"parameters":[{"id":624,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":753,"character":18}]},{"id":618,"name":"taggedRules","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":619,"name":"taggedRules","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns rules with the matching tag."},"parameters":[{"id":620,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":621,"name":"tag","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The tag to search for.\n"},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","isArray":true,"name":"Rule","id":297,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":748,"character":26}]}],"groups":[{"title":"Properties","kind":1024,"children":[592]},{"title":"Methods","kind":2048,"children":[604,596,601,593,622,618]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":722,"character":32}]},{"id":17,"name":"Validator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates.\nResponsible for validating objects and properties."},"children":[{"id":27,"name":"ruleExists","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":28,"name":"ruleExists","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Determines whether a rule exists in a set of rules.","tags":[{"tag":"parem","text":"rule The rule to find.\n"}]},"parameters":[{"id":29,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"instrinct","name":"any"}},{"id":30,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":54,"character":27}]},{"id":23,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":24,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":25,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":26,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the implementation should lookup the rules for the\nspecified object. This may not be possible for all implementations of this interface.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","isArray":true,"name":"ValidationError","id":2}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":48,"character":31}]},{"id":18,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":19,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":20,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":21,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":22,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. If unspecified, the implementation should lookup the rules for the\nspecified object. This may not be possible for all implementations of this interface.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","isArray":true,"name":"ValidationError","id":2}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":41,"character":33}]}],"groups":[{"title":"Methods","kind":2048,"children":[27,23,18]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":33,"character":35}],"extendedBy":[{"type":"reference","name":"StandardValidator","id":385}]},{"id":327,"name":"PropertyAccessor","kind":256,"kindString":"Interface","flags":{"isExported":true},"typeParameter":[{"id":328,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":329,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"signatures":[{"id":330,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":331,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":411,"character":37}]},{"id":31,"name":"RenderErrorInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"An error to render (or unrender) and the associated elements (if any)"},"children":[{"id":33,"name":"elements","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The associated elements (if any)."},"sources":[{"fileName":"aurelia-validation.d.ts","line":88,"character":16}],"type":{"type":"reference","isArray":true,"name":"Element"}},{"id":32,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The validation error."},"sources":[{"fileName":"aurelia-validation.d.ts","line":84,"character":13}],"type":{"type":"reference","name":"ValidationError","id":2}}],"groups":[{"title":"Properties","kind":1024,"children":[33,32]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":80,"character":43}]},{"id":34,"name":"RenderInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Defines which errors to render and which errors to unrender."},"children":[{"id":35,"name":"kind","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The \"kind\" of render instruction. Either 'validate' or 'reset'."},"sources":[{"fileName":"aurelia-validation.d.ts","line":97,"character":12}],"type":{"type":"union","types":[{"type":"stringLiteral","value":"validate"},{"type":"stringLiteral","value":"reset"}]}},{"id":36,"name":"render","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The errors to render."},"sources":[{"fileName":"aurelia-validation.d.ts","line":101,"character":14}],"type":{"type":"reference","isArray":true,"name":"RenderErrorInstruction","id":31}},{"id":37,"name":"unrender","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The errors to unrender."},"sources":[{"fileName":"aurelia-validation.d.ts","line":105,"character":16}],"type":{"type":"reference","isArray":true,"name":"RenderErrorInstruction","id":31}}],"groups":[{"title":"Properties","kind":1024,"children":[35,36,37]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":93,"character":38}]},{"id":251,"name":"RenderedError","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":252,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":324,"character":13}],"type":{"type":"reference","name":"ValidationError","id":2}},{"id":253,"name":"targets","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":325,"character":15}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"groups":[{"title":"Properties","kind":1024,"children":[252,253]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":323,"character":34}]},{"id":297,"name":"Rule","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"A rule definition. Associations a rule with a property or object."},"typeParameter":[{"id":298,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":299,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":301,"name":"condition","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":374,"character":17}],"type":{"type":"reflection","declaration":{"id":302,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":303,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":304,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":305,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"union","types":[{"type":"instrinct","name":"boolean"},{"type":"reference","name":"Promise","typeArguments":[{"type":"instrinct","name":"boolean"}]}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":374,"character":18}]}}},{"id":306,"name":"config","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":375,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":312,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":380,"character":15}],"type":{"type":"union","types":[{"type":"reference","name":"Expression"},{"type":"instrinct","name":"null"}]}},{"id":311,"name":"messageKey","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":379,"character":18}],"type":{"type":"instrinct","name":"string"}},{"id":300,"name":"property","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":373,"character":16}],"type":{"type":"reference","name":"RuleProperty","id":294}},{"id":313,"name":"sequence","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":381,"character":16}],"type":{"type":"instrinct","name":"number"}},{"id":314,"name":"tag","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":382,"character":11}],"type":{"type":"instrinct","name":"string"}},{"id":307,"name":"when","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":376,"character":12}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":308,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":309,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":310,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":376,"character":13}]}},{"type":"instrinct","name":"null"}]}}],"groups":[{"title":"Properties","kind":1024,"children":[301,306,312,311,300,313,314,307]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":372,"character":25}]},{"id":294,"name":"RuleProperty","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Information related to a property that is the subject of validation."},"children":[{"id":296,"name":"displayName","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The displayName of the property (or object)."},"sources":[{"fileName":"aurelia-validation.d.ts","line":367,"character":19}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":295,"name":"name","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The property name. null indicates the rule targets the object itself."},"sources":[{"fileName":"aurelia-validation.d.ts","line":363,"character":12}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"groups":[{"title":"Properties","kind":1024,"children":[296,295]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":359,"character":33}]},{"id":42,"name":"ValidateInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":43,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The object to validate."},"sources":[{"fileName":"aurelia-validation.d.ts","line":126,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":44,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The property to validate. Optional."},"sources":[{"fileName":"aurelia-validation.d.ts","line":130,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":45,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The rules to validate. Optional."},"sources":[{"fileName":"aurelia-validation.d.ts","line":134,"character":13}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Properties","kind":1024,"children":[43,44,45]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":122,"character":40}]},{"id":370,"name":"ValidationMessages","kind":256,"kindString":"Interface","flags":{"isExported":true},"indexSignature":[{"id":371,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":372,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":436,"character":39}]},{"id":38,"name":"ValidationRenderer","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Renders validation errors."},"children":[{"id":39,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":40,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Render the errors."},"parameters":[{"id":41,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The render instruction. Defines which errors to render and which\nerrors to unrender.\n"},"type":{"type":"reference","name":"RenderInstruction","id":34}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":116,"character":14}]}],"groups":[{"title":"Methods","kind":2048,"children":[39]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":110,"character":39}],"implementedBy":[{"type":"reference","name":"ValidationErrorsCustomAttribute","id":254}]},{"id":637,"name":"validateTrigger","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Validation triggers."},"sources":[{"fileName":"aurelia-validation.d.ts","line":60,"character":32}],"type":{"type":"reflection","declaration":{"id":638,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":640,"name":"blur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":62,"character":12}],"type":{"type":"instrinct","name":"number"}},{"id":641,"name":"change","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":63,"character":14}],"type":{"type":"instrinct","name":"number"}},{"id":642,"name":"changeOrBlur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":64,"character":20}],"type":{"type":"instrinct","name":"number"}},{"id":639,"name":"manual","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":61,"character":14}],"type":{"type":"instrinct","name":"number"}}],"groups":[{"title":"Variables","kind":32,"children":[640,641,642,639]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":60,"character":33}]}}},{"id":653,"name":"validationMessages","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Dictionary of validation messages. [messageKey]: messageExpression"},"sources":[{"fileName":"aurelia-validation.d.ts","line":442,"character":35}],"type":{"type":"reference","name":"ValidationMessages","id":370}},{"id":654,"name":"configure","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":655,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures the plugin."},"parameters":[{"id":656,"name":"frameworkConfig","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":657,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":658,"name":"container","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":792,"character":17}],"type":{"type":"reference","name":"Container"}},{"id":659,"name":"globalResources","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":793,"character":23}],"type":{"type":"reflection","declaration":{"id":660,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":661,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":662,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"string"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":793,"character":24}]}}}],"groups":[{"title":"Variables","kind":32,"children":[658,659]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":791,"character":46}]}}},{"id":663,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":664,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":665,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":666,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AureliaValidationConfiguration","id":625}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":794,"character":17}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":791,"character":29}]},{"id":643,"name":"getPropertyInfo","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":644,"name":"getPropertyInfo","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the object and property name for the specified expression."},"parameters":[{"id":645,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The expression"},"type":{"type":"reference","name":"Expression"}},{"id":646,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The scope\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":647,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":648,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":73,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":649,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":74,"character":20}],"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Variables","kind":32,"children":[648,649]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":72,"character":73}]}},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":72,"character":35}]},{"id":650,"name":"isString","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":651,"name":"isString","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":652,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":407,"character":28}]}],"groups":[{"title":"Classes","kind":128,"children":[625,569,423,506,358,315,385,136,115,157,177,197,217,46,237,2,254,373,332,282,591,17]},{"title":"Interfaces","kind":256,"children":[327,31,34,251,297,294,42,370,38]},{"title":"Variables","kind":32,"children":[637,653]},{"title":"Functions","kind":64,"children":[654,643,650]}]} diff --git a/package.json b/package.json index cdc1d6c4..baec13b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-validation", - "version": "0.13.1", + "version": "0.14.0", "description": "Validation for Aurelia applications", "keywords": [ "aurelia",