From 9c9ab7266609ff5f942f3f0b65876b5e218648c5 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Sat, 24 Dec 2016 09:04:01 -0800 Subject: [PATCH] chore(all): prepare release 1.0.0-beta.1.0.1 --- bower.json | 2 +- dist/amd/validation-controller.js | 7 +- dist/commonjs/validation-controller.js | 7 +- dist/es2015/aurelia-validation.js | 22 +- dist/es2015/implementation/rules.js | 20 +- .../implementation/standard-validator.js | 89 ++-- .../implementation/validation-messages.js | 40 +- .../implementation/validation-parser.js | 73 ++- .../es2015/implementation/validation-rules.js | 266 +++++------ dist/es2015/property-info.js | 14 +- dist/es2015/validate-binding-behavior-base.js | 45 +- dist/es2015/validate-binding-behavior.js | 75 +--- dist/es2015/validate-result.js | 15 +- dist/es2015/validate-trigger.js | 2 +- dist/es2015/validation-controller-factory.js | 22 +- dist/es2015/validation-controller.js | 241 +++++----- .../validation-errors-custom-attribute.js | 50 +-- .../validation-renderer-custom-attribute.js | 20 +- dist/es2015/validator.js | 8 +- dist/native-modules/aurelia-validation.d.ts | 43 ++ dist/native-modules/aurelia-validation.js | 59 +++ .../controller-validate-result.d.ts | 19 + .../controller-validate-result.js | 0 dist/native-modules/implementation/rule.d.ts | 29 ++ dist/native-modules/implementation/rule.js | 0 dist/native-modules/implementation/rules.d.ts | 22 + dist/native-modules/implementation/rules.js | 37 ++ .../implementation/standard-validator.d.ts | 40 ++ .../implementation/standard-validator.js | 131 ++++++ dist/native-modules/implementation/util.d.ts | 1 + dist/native-modules/implementation/util.js | 3 + .../implementation/validation-messages.d.ts | 29 ++ .../implementation/validation-messages.js | 58 +++ .../implementation/validation-parser.d.ts | 26 ++ .../implementation/validation-parser.js | 88 ++++ .../implementation/validation-rules.d.ts | 257 +++++++++++ .../implementation/validation-rules.js | 416 ++++++++++++++++++ dist/native-modules/property-info.d.ts | 10 + dist/native-modules/property-info.js | 42 ++ .../validate-binding-behavior-base.d.ts | 19 + .../validate-binding-behavior-base.js | 106 +++++ .../validate-binding-behavior.d.ts | 47 ++ .../validate-binding-behavior.js | 92 ++++ dist/native-modules/validate-instruction.d.ts | 17 + dist/native-modules/validate-instruction.js | 0 dist/native-modules/validate-result.d.ts | 23 + dist/native-modules/validate-result.js | 26 ++ dist/native-modules/validate-trigger.d.ts | 9 + dist/native-modules/validate-trigger.js | 25 ++ .../validation-controller-factory.d.ts | 20 + .../validation-controller-factory.js | 34 ++ .../native-modules/validation-controller.d.ts | 108 +++++ dist/native-modules/validation-controller.js | 345 +++++++++++++++ .../validation-errors-custom-attribute.d.ts | 26 ++ .../validation-errors-custom-attribute.js | 69 +++ .../validation-renderer-custom-attribute.d.ts | 9 + .../validation-renderer-custom-attribute.js | 20 + dist/native-modules/validation-renderer.d.ts | 42 ++ dist/native-modules/validation-renderer.js | 0 dist/native-modules/validator.d.ts | 27 ++ dist/native-modules/validator.js | 9 + dist/system/validation-controller.js | 7 +- doc/CHANGELOG.md | 12 + doc/api.json | 2 +- package.json | 2 +- 65 files changed, 2847 insertions(+), 577 deletions(-) create mode 100644 dist/native-modules/aurelia-validation.d.ts create mode 100644 dist/native-modules/aurelia-validation.js create mode 100644 dist/native-modules/controller-validate-result.d.ts create mode 100644 dist/native-modules/controller-validate-result.js create mode 100644 dist/native-modules/implementation/rule.d.ts create mode 100644 dist/native-modules/implementation/rule.js create mode 100644 dist/native-modules/implementation/rules.d.ts create mode 100644 dist/native-modules/implementation/rules.js create mode 100644 dist/native-modules/implementation/standard-validator.d.ts create mode 100644 dist/native-modules/implementation/standard-validator.js create mode 100644 dist/native-modules/implementation/util.d.ts create mode 100644 dist/native-modules/implementation/util.js create mode 100644 dist/native-modules/implementation/validation-messages.d.ts create mode 100644 dist/native-modules/implementation/validation-messages.js create mode 100644 dist/native-modules/implementation/validation-parser.d.ts create mode 100644 dist/native-modules/implementation/validation-parser.js create mode 100644 dist/native-modules/implementation/validation-rules.d.ts create mode 100644 dist/native-modules/implementation/validation-rules.js create mode 100644 dist/native-modules/property-info.d.ts create mode 100644 dist/native-modules/property-info.js create mode 100644 dist/native-modules/validate-binding-behavior-base.d.ts create mode 100644 dist/native-modules/validate-binding-behavior-base.js create mode 100644 dist/native-modules/validate-binding-behavior.d.ts create mode 100644 dist/native-modules/validate-binding-behavior.js create mode 100644 dist/native-modules/validate-instruction.d.ts create mode 100644 dist/native-modules/validate-instruction.js create mode 100644 dist/native-modules/validate-result.d.ts create mode 100644 dist/native-modules/validate-result.js create mode 100644 dist/native-modules/validate-trigger.d.ts create mode 100644 dist/native-modules/validate-trigger.js create mode 100644 dist/native-modules/validation-controller-factory.d.ts create mode 100644 dist/native-modules/validation-controller-factory.js create mode 100644 dist/native-modules/validation-controller.d.ts create mode 100644 dist/native-modules/validation-controller.js create mode 100644 dist/native-modules/validation-errors-custom-attribute.d.ts create mode 100644 dist/native-modules/validation-errors-custom-attribute.js create mode 100644 dist/native-modules/validation-renderer-custom-attribute.d.ts create mode 100644 dist/native-modules/validation-renderer-custom-attribute.js create mode 100644 dist/native-modules/validation-renderer.d.ts create mode 100644 dist/native-modules/validation-renderer.js create mode 100644 dist/native-modules/validator.d.ts create mode 100644 dist/native-modules/validator.js diff --git a/bower.json b/bower.json index ba2a4166..daa16fa7 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-validation", - "version": "1.0.0-beta.1.0.0", + "version": "1.0.0-beta.1.0.1", "description": "Validation for Aurelia applications", "keywords": [ "aurelia", diff --git a/dist/amd/validation-controller.js b/dist/amd/validation-controller.js index 68439c15..15037a66 100644 --- a/dist/amd/validation-controller.js +++ b/dist/amd/validation-controller.js @@ -265,12 +265,15 @@ define(["require", "exports", "./validator", "./validate-trigger", "./property-i // do an in-place replacement of the old result with the new result. // this ensures any repeats bound to this.results will not thrash. this_1.results.splice(this_1.results.indexOf(oldResult), 1, newResult); - if (newResult.valid) { + if (!oldResult.valid && newResult.valid) { this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); } - else { + else if (!oldResult.valid && !newResult.valid) { this_1.errors.splice(this_1.errors.indexOf(oldResult), 1, newResult); } + else if (!newResult.valid) { + this_1.errors.push(newResult); + } } }; var this_1 = this; diff --git a/dist/commonjs/validation-controller.js b/dist/commonjs/validation-controller.js index d3415b61..cca70ccb 100644 --- a/dist/commonjs/validation-controller.js +++ b/dist/commonjs/validation-controller.js @@ -268,12 +268,15 @@ var ValidationController = (function () { // do an in-place replacement of the old result with the new result. // this ensures any repeats bound to this.results will not thrash. this_1.results.splice(this_1.results.indexOf(oldResult), 1, newResult); - if (newResult.valid) { + if (!oldResult.valid && newResult.valid) { this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); } - else { + else if (!oldResult.valid && !newResult.valid) { this_1.errors.splice(this_1.errors.indexOf(oldResult), 1, newResult); } + else if (!newResult.valid) { + this_1.errors.push(newResult); + } } }; var this_1 = this; diff --git a/dist/es2015/aurelia-validation.js b/dist/es2015/aurelia-validation.js index 0e7313fd..82b3b9be 100644 --- a/dist/es2015/aurelia-validation.js +++ b/dist/es2015/aurelia-validation.js @@ -20,36 +20,34 @@ import { ValidationRules } from './implementation/validation-rules'; /** * Aurelia Validation Configuration API */ -var AureliaValidationConfiguration = (function () { - function AureliaValidationConfiguration() { +export class AureliaValidationConfiguration { + constructor() { this.validatorType = StandardValidator; } /** * Use a custom Validator implementation. */ - AureliaValidationConfiguration.prototype.customValidator = function (type) { + customValidator(type) { this.validatorType = type; - }; + } /** * Applies the configuration. */ - AureliaValidationConfiguration.prototype.apply = function (container) { - var validator = container.get(this.validatorType); + apply(container) { + const validator = container.get(this.validatorType); container.registerInstance(Validator, validator); - }; - return AureliaValidationConfiguration; -}()); -export { AureliaValidationConfiguration }; + } +} /** * Configures the plugin. */ export function configure(frameworkConfig, callback) { // the fluent rule definition API needs the parser to translate messages // to interpolation expressions. - var parser = frameworkConfig.container.get(ValidationParser); + const parser = frameworkConfig.container.get(ValidationParser); ValidationRules.initialize(parser); // configure... - var config = new AureliaValidationConfiguration(); + const config = new AureliaValidationConfiguration(); if (callback instanceof Function) { callback(config); } diff --git a/dist/es2015/implementation/rules.js b/dist/es2015/implementation/rules.js index 3ac2caaa..db8977e5 100644 --- a/dist/es2015/implementation/rules.js +++ b/dist/es2015/implementation/rules.js @@ -1,36 +1,32 @@ /** * Sets, unsets and retrieves rules on an object or constructor function. */ -var Rules = (function () { - function Rules() { - } +export class Rules { /** * Applies the rules to a target. */ - Rules.set = function (target, rules) { + static set(target, rules) { if (target instanceof Function) { target = target.prototype; } Object.defineProperty(target, Rules.key, { enumerable: false, configurable: false, writable: true, value: rules }); - }; + } /** * Removes rules from a target. */ - Rules.unset = function (target) { + static unset(target) { if (target instanceof Function) { target = target.prototype; } target[Rules.key] = null; - }; + } /** * Retrieves the target's rules. */ - Rules.get = function (target) { + static get(target) { return target[Rules.key] || null; - }; - return Rules; -}()); -export { Rules }; + } +} /** * The name of the property that stores the rules. */ diff --git a/dist/es2015/implementation/standard-validator.js b/dist/es2015/implementation/standard-validator.js index e27592d6..933e59a4 100644 --- a/dist/es2015/implementation/standard-validator.js +++ b/dist/es2015/implementation/standard-validator.js @@ -1,8 +1,3 @@ -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidateResult } from '../validate-result'; @@ -12,14 +7,12 @@ import { ValidationMessageProvider } from './validation-messages'; * Validates. * Responsible for validating objects and properties. */ -var StandardValidator = (function (_super) { - __extends(StandardValidator, _super); - function StandardValidator(messageProvider, resources) { - var _this = _super.call(this) || this; - _this.messageProvider = messageProvider; - _this.lookupFunctions = resources.lookupFunctions; - _this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); - return _this; +export class StandardValidator extends Validator { + constructor(messageProvider, resources) { + super(); + this.messageProvider = messageProvider; + this.lookupFunctions = resources.lookupFunctions; + this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); } /** * Validates the specified property. @@ -28,39 +21,39 @@ var StandardValidator = (function (_super) { * @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) { + 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) */ - StandardValidator.prototype.validateObject = function (object, rules) { + 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. */ - StandardValidator.prototype.ruleExists = function (rules, rule) { - var i = rules.length; + ruleExists(rules, rule) { + let 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; + } + getMessage(rule, object, value) { + const expression = rule.message || this.messageProvider.getMessage(rule.messageKey); + let { name: propertyName, displayName } = rule.property; if (propertyName !== null) { displayName = this.messageProvider.getDisplayName(propertyName, displayName); } - var overrideContext = { + const overrideContext = { $displayName: displayName, $propertyName: propertyName, $value: value, @@ -68,52 +61,48 @@ var StandardValidator = (function (_super) { $config: rule.config, $getDisplayName: this.getDisplayName }; - return expression.evaluate({ bindingContext: object, overrideContext: overrideContext }, this.lookupFunctions); - }; - StandardValidator.prototype.validateRuleSequence = function (object, propertyName, ruleSequence, sequence, results) { - var _this = this; + return expression.evaluate({ bindingContext: object, overrideContext }, this.lookupFunctions); + } + validateRuleSequence(object, propertyName, ruleSequence, sequence, results) { // are we validating all properties or a single property? - var validateAllProperties = propertyName === null || propertyName === undefined; - var rules = ruleSequence[sequence]; - var allValid = true; + const validateAllProperties = propertyName === null || propertyName === undefined; + const rules = ruleSequence[sequence]; + let allValid = true; // validate each rule. - var promises = []; - var _loop_1 = function (i) { - var rule = rules[i]; + const promises = []; + for (let i = 0; i < rules.length; i++) { + const rule = rules[i]; // is the rule related to the property we're validating. if (!validateAllProperties && rule.property.name !== propertyName) { - return "continue"; + continue; } // is this a conditional rule? is the condition met? if (rule.when && !rule.when(object)) { - return "continue"; + continue; } // validate. - var value = rule.property.name === null ? object : object[rule.property.name]; - var promiseOrBoolean = rule.condition(value, object); + const value = rule.property.name === null ? object : object[rule.property.name]; + let promiseOrBoolean = rule.condition(value, object); if (!(promiseOrBoolean instanceof Promise)) { promiseOrBoolean = Promise.resolve(promiseOrBoolean); } - promises.push(promiseOrBoolean.then(function (valid) { - var message = valid ? null : _this.getMessage(rule, object, value); + promises.push(promiseOrBoolean.then(valid => { + const message = valid ? null : this.getMessage(rule, object, value); results.push(new ValidateResult(rule, object, rule.property.name, valid, message)); allValid = allValid && valid; return valid; })); - }; - for (var i = 0; i < rules.length; i++) { - _loop_1(i); } return Promise.all(promises) - .then(function () { + .then(() => { sequence++; if (allValid && sequence < ruleSequence.length) { - return _this.validateRuleSequence(object, propertyName, ruleSequence, sequence, results); + return this.validateRuleSequence(object, propertyName, ruleSequence, sequence, results); } return results; }); - }; - StandardValidator.prototype.validate = function (object, propertyName, rules) { + } + validate(object, propertyName, rules) { // rules specified? if (!rules) { // no. attempt to locate the rules. @@ -124,8 +113,6 @@ var StandardValidator = (function (_super) { return Promise.resolve([]); } return this.validateRuleSequence(object, propertyName, rules, 0, []); - }; - return StandardValidator; -}(Validator)); -export { StandardValidator }; + } +} StandardValidator.inject = [ValidationMessageProvider, ViewResources]; diff --git a/dist/es2015/implementation/validation-messages.js b/dist/es2015/implementation/validation-messages.js index c1c31601..a1dda6ea 100644 --- a/dist/es2015/implementation/validation-messages.js +++ b/dist/es2015/implementation/validation-messages.js @@ -2,33 +2,33 @@ import { ValidationParser } from './validation-parser'; /** * Dictionary of validation messages. [messageKey]: messageExpression */ -export var validationMessages = { +export const validationMessages = { /** * The default validation message. Used with rules that have no standard message. */ - default: "${$displayName} is invalid.", - required: "${$displayName} is required.", - matches: "${$displayName} is not correctly formatted.", - email: "${$displayName} is not a valid email.", - minLength: "${$displayName} must be at least ${$config.length} character${$config.length === 1 ? '' : 's'}.", - maxLength: "${$displayName} cannot be longer than ${$config.length} character${$config.length === 1 ? '' : 's'}.", - minItems: "${$displayName} must contain at least ${$config.count} item${$config.count === 1 ? '' : 's'}.", - maxItems: "${$displayName} cannot contain more than ${$config.count} item${$config.count === 1 ? '' : 's'}.", - equals: "${$displayName} must be ${$config.expectedValue}.", + default: `\${$displayName} is invalid.`, + required: `\${$displayName} is required.`, + matches: `\${$displayName} is not correctly formatted.`, + email: `\${$displayName} is not a valid email.`, + minLength: `\${$displayName} must be at least \${$config.length} character\${$config.length === 1 ? '' : 's'}.`, + maxLength: `\${$displayName} cannot be longer than \${$config.length} character\${$config.length === 1 ? '' : 's'}.`, + minItems: `\${$displayName} must contain at least \${$config.count} item\${$config.count === 1 ? '' : 's'}.`, + maxItems: `\${$displayName} cannot contain more than \${$config.count} item\${$config.count === 1 ? '' : 's'}.`, + equals: `\${$displayName} must be \${$config.expectedValue}.`, }; /** * Retrieves validation messages and property display names. */ -var ValidationMessageProvider = (function () { - function ValidationMessageProvider(parser) { +export class ValidationMessageProvider { + constructor(parser) { this.parser = parser; } /** * Returns a message binding expression that corresponds to the key. * @param key The message key. */ - ValidationMessageProvider.prototype.getMessage = function (key) { - var message; + getMessage(key) { + let message; if (key in validationMessages) { message = validationMessages[key]; } @@ -36,23 +36,21 @@ var ValidationMessageProvider = (function () { message = validationMessages['default']; } return this.parser.parseMessage(message); - }; + } /** * Formulates a property display name using the property name and the configured * displayName (if provided). * Override this with your own custom logic. * @param propertyName The property name. */ - ValidationMessageProvider.prototype.getDisplayName = function (propertyName, displayName) { + getDisplayName(propertyName, displayName) { if (displayName !== null && displayName !== undefined) { return displayName; } // split on upper-case letters. - var words = propertyName.split(/(?=[A-Z])/).join(' '); + const words = propertyName.split(/(?=[A-Z])/).join(' '); // capitalize first letter. return words.charAt(0).toUpperCase() + words.slice(1); - }; - return ValidationMessageProvider; -}()); -export { ValidationMessageProvider }; + } +} ValidationMessageProvider.inject = [ValidationParser]; diff --git a/dist/es2015/implementation/validation-parser.js b/dist/es2015/implementation/validation-parser.js index ca1024aa..48666130 100644 --- a/dist/es2015/implementation/validation-parser.js +++ b/dist/es2015/implementation/validation-parser.js @@ -1,14 +1,9 @@ -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; import { Parser, AccessMember, AccessScope, LiteralString, Binary, Conditional, LiteralPrimitive, CallMember, Unparser } from 'aurelia-binding'; import { BindingLanguage } from 'aurelia-templating'; import { isString } from './util'; import * as LogManager from 'aurelia-logging'; -var ValidationParser = (function () { - function ValidationParser(parser, bindinqLanguage) { +export class ValidationParser { + constructor(parser, bindinqLanguage) { this.parser = parser; this.bindinqLanguage = bindinqLanguage; this.emptyStringExpression = new LiteralString(''); @@ -16,27 +11,27 @@ var ValidationParser = (function () { this.undefinedExpression = new LiteralPrimitive(undefined); this.cache = {}; } - ValidationParser.prototype.parseMessage = function (message) { + parseMessage(message) { if (this.cache[message] !== undefined) { return this.cache[message]; } - var parts = this.bindinqLanguage.parseInterpolation(null, message); + const parts = this.bindinqLanguage.parseInterpolation(null, message); if (parts === null) { return new LiteralString(message); } - var expression = new LiteralString(parts[0]); - for (var i = 1; i < parts.length; i += 2) { + let expression = new LiteralString(parts[0]); + for (let i = 1; i < parts.length; i += 2) { expression = new Binary('+', expression, new Binary('+', this.coalesce(parts[i]), new LiteralString(parts[i + 1]))); } MessageExpressionValidator.validate(expression, message); this.cache[message] = expression; return expression; - }; - ValidationParser.prototype.parseProperty = function (property) { + } + parseProperty(property) { if (isString(property)) { return { name: property, displayName: null }; } - var accessor = this.getAccessorExpression(property.toString()); + const accessor = this.getAccessorExpression(property.toString()); if (accessor instanceof AccessScope || accessor instanceof AccessMember && accessor.object instanceof AccessScope) { return { @@ -44,45 +39,39 @@ var ValidationParser = (function () { displayName: null }; } - throw new Error("Invalid subject: \"" + accessor + "\""); - }; - ValidationParser.prototype.coalesce = function (part) { + 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', [])); - }; - 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); + } + 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); + throw new Error(`Unable to parse accessor function:\n${fn}`); } return this.parser.parse(match[1]); - }; - return ValidationParser; -}()); -export { ValidationParser }; + } +} ValidationParser.inject = [Parser, BindingLanguage]; -var MessageExpressionValidator = (function (_super) { - __extends(MessageExpressionValidator, _super); - function MessageExpressionValidator(originalMessage) { - var _this = _super.call(this, []) || this; - _this.originalMessage = originalMessage; - return _this; +export class MessageExpressionValidator extends Unparser { + constructor(originalMessage) { + super([]); + this.originalMessage = originalMessage; } - MessageExpressionValidator.validate = function (expression, originalMessage) { - var visitor = new MessageExpressionValidator(originalMessage); + static validate(expression, originalMessage) { + const visitor = new MessageExpressionValidator(originalMessage); expression.accept(visitor); - }; - MessageExpressionValidator.prototype.visitAccessScope = function (access) { + } + visitAccessScope(access) { if (access.ancestor !== 0) { throw new Error('$parent is not permitted in validation message expressions.'); } if (['displayName', 'propertyName', 'value', 'object', 'config', 'getDisplayName'].indexOf(access.name) !== -1) { LogManager.getLogger('aurelia-validation') - .warn("Did you mean to use \"$" + access.name + "\" instead of \"" + access.name + "\" in this validation message template: \"" + this.originalMessage + "\"?"); + .warn(`Did you mean to use "$${access.name}" instead of "${access.name}" in this validation message template: "${this.originalMessage}"?`); } - }; - return MessageExpressionValidator; -}(Unparser)); -export { MessageExpressionValidator }; + } +} diff --git a/dist/es2015/implementation/validation-rules.js b/dist/es2015/implementation/validation-rules.js index 3882f661..99481e5f 100644 --- a/dist/es2015/implementation/validation-rules.js +++ b/dist/es2015/implementation/validation-rules.js @@ -4,16 +4,15 @@ import { validationMessages } from './validation-messages'; /** * Part of the fluent rule API. Enables customizing property rules. */ -var FluentRuleCustomizer = (function () { - function FluentRuleCustomizer(property, condition, config, fluentEnsure, fluentRules, parser) { - if (config === void 0) { config = {}; } +export class FluentRuleCustomizer { + constructor(property, condition, config = {}, fluentEnsure, fluentRules, parser) { this.fluentEnsure = fluentEnsure; this.fluentRules = fluentRules; this.parser = parser; this.rule = { - property: property, - condition: condition, - config: config, + property, + condition, + config, when: null, messageKey: 'default', message: null, @@ -26,74 +25,70 @@ var FluentRuleCustomizer = (function () { * been validated successfully. Use to postpone validation of costly * rules until less expensive rules pass validation. */ - FluentRuleCustomizer.prototype.then = function () { + then() { this.fluentRules.sequence++; return this; - }; + } /** * Specifies the key to use when looking up the rule's validation message. */ - FluentRuleCustomizer.prototype.withMessageKey = function (key) { + withMessageKey(key) { this.rule.messageKey = key; this.rule.message = null; return this; - }; + } /** * Specifies rule's validation message. */ - FluentRuleCustomizer.prototype.withMessage = function (message) { + withMessage(message) { this.rule.messageKey = 'custom'; this.rule.message = this.parser.parseMessage(message); return this; - }; + } /** * Specifies a condition that must be met before attempting to validate the rule. * @param condition A function that accepts the object as a parameter and returns true * or false whether the rule should be evaluated. */ - FluentRuleCustomizer.prototype.when = function (condition) { + when(condition) { this.rule.when = condition; return this; - }; + } /** * Tags the rule instance, enabling the rule to be found easily * using ValidationRules.taggedRules(rules, tag) */ - FluentRuleCustomizer.prototype.tag = function (tag) { + tag(tag) { this.rule.tag = tag; return this; - }; + } ///// FluentEnsure APIs ///// /** * Target a property with validation rules. * @param property The property to target. Can be the property name or a property accessor function. */ - FluentRuleCustomizer.prototype.ensure = function (subject) { + ensure(subject) { return this.fluentEnsure.ensure(subject); - }; + } /** * Targets an object with validation rules. */ - FluentRuleCustomizer.prototype.ensureObject = function () { + ensureObject() { return this.fluentEnsure.ensureObject(); - }; - Object.defineProperty(FluentRuleCustomizer.prototype, "rules", { - /** - * Rules that have been defined using the fluent API. - */ - get: function () { - return this.fluentEnsure.rules; - }, - enumerable: true, - configurable: true - }); + } + /** + * Rules that have been defined using the fluent API. + */ + get rules() { + return this.fluentEnsure.rules; + } /** * Applies the rules to a class or object, making them discoverable by the StandardValidator. * @param target A class or object. */ - FluentRuleCustomizer.prototype.on = function (target) { + on(target) { return this.fluentEnsure.on(target); - }; + } ///////// FluentRules APIs ///////// /** * Applies an ad-hoc rule function to the ensured property or object. @@ -101,87 +96,80 @@ var FluentRuleCustomizer = (function () { * Will be called with two arguments, the property value and the object. * Should return a boolean or a Promise that resolves to a boolean. */ - FluentRuleCustomizer.prototype.satisfies = function (condition, config) { + satisfies(condition, config) { return this.fluentRules.satisfies(condition, config); - }; + } /** * Applies a rule by name. * @param name The name of the custom or standard rule. * @param args The rule's arguments. */ - FluentRuleCustomizer.prototype.satisfiesRule = function (name) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - return (_a = this.fluentRules).satisfiesRule.apply(_a, [name].concat(args)); - var _a; - }; + satisfiesRule(name, ...args) { + return this.fluentRules.satisfiesRule(name, ...args); + } /** * Applies the "required" rule to the property. * The value cannot be null, undefined or whitespace. */ - FluentRuleCustomizer.prototype.required = function () { + required() { return this.fluentRules.required(); - }; + } /** * Applies the "matches" rule to the property. * Value must match the specified regular expression. * null, undefined and empty-string values are considered valid. */ - FluentRuleCustomizer.prototype.matches = function (regex) { + matches(regex) { return this.fluentRules.matches(regex); - }; + } /** * Applies the "email" rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRuleCustomizer.prototype.email = function () { + email() { return this.fluentRules.email(); - }; + } /** * Applies the "minLength" STRING validation rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRuleCustomizer.prototype.minLength = function (length) { + minLength(length) { return this.fluentRules.minLength(length); - }; + } /** * Applies the "maxLength" STRING validation rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRuleCustomizer.prototype.maxLength = function (length) { + maxLength(length) { return this.fluentRules.maxLength(length); - }; + } /** * Applies the "minItems" ARRAY validation rule to the property. * null and undefined values are considered valid. */ - FluentRuleCustomizer.prototype.minItems = function (count) { + minItems(count) { return this.fluentRules.minItems(count); - }; + } /** * Applies the "maxItems" ARRAY validation rule to the property. * null and undefined values are considered valid. */ - FluentRuleCustomizer.prototype.maxItems = function (count) { + maxItems(count) { return this.fluentRules.maxItems(count); - }; + } /** * Applies the "equals" validation rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRuleCustomizer.prototype.equals = function (expectedValue) { + equals(expectedValue) { return this.fluentRules.equals(expectedValue); - }; - return FluentRuleCustomizer; -}()); -export { FluentRuleCustomizer }; + } +} /** * Part of the fluent rule API. Enables applying rules to properties and objects. */ -var FluentRules = (function () { - function FluentRules(fluentEnsure, parser, property) { +export class FluentRules { + constructor(fluentEnsure, parser, property) { this.fluentEnsure = fluentEnsure; this.parser = parser; this.property = property; @@ -195,125 +183,113 @@ var FluentRules = (function () { /** * Sets the display name of the ensured property. */ - FluentRules.prototype.displayName = function (name) { + displayName(name) { this.property.displayName = name; return this; - }; + } /** * Applies an ad-hoc rule function to the ensured property or object. * @param condition The function to validate the rule. * Will be called with two arguments, the property value and the object. * Should return a boolean or a Promise that resolves to a boolean. */ - FluentRules.prototype.satisfies = function (condition, config) { + satisfies(condition, config) { return new FluentRuleCustomizer(this.property, condition, config, this.fluentEnsure, this, this.parser); - }; + } /** * Applies a rule by name. * @param name The name of the custom or standard rule. * @param args The rule's arguments. */ - FluentRules.prototype.satisfiesRule = function (name) { - var _this = this; - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var rule = FluentRules.customRules[name]; + satisfiesRule(name, ...args) { + let rule = FluentRules.customRules[name]; if (!rule) { // standard rule? rule = this[name]; if (rule instanceof Function) { - return rule.call.apply(rule, [this].concat(args)); + return rule.call(this, ...args); } - throw new Error("Rule with name \"" + name + "\" does not exist."); + throw new Error(`Rule with name "${name}" does not exist.`); } - var config = rule.argsToConfig ? rule.argsToConfig.apply(rule, args) : undefined; - return this.satisfies(function (value, obj) { - return (_a = rule.condition).call.apply(_a, [_this, value, obj].concat(args)); - var _a; - }, config) + const config = rule.argsToConfig ? rule.argsToConfig(...args) : undefined; + return this.satisfies((value, obj) => rule.condition.call(this, value, obj, ...args), config) .withMessageKey(name); - }; + } /** * Applies the "required" rule to the property. * The value cannot be null, undefined or whitespace. */ - FluentRules.prototype.required = function () { - return this.satisfies(function (value) { - return value !== null - && value !== undefined - && !(isString(value) && !/\S/.test(value)); - }).withMessageKey('required'); - }; + required() { + return this.satisfies(value => value !== null + && value !== undefined + && !(isString(value) && !/\S/.test(value))).withMessageKey('required'); + } /** * Applies the "matches" rule to the property. * Value must match the specified regular expression. * null, undefined and empty-string values are considered valid. */ - FluentRules.prototype.matches = function (regex) { - return this.satisfies(function (value) { return value === null || value === undefined || value.length === 0 || regex.test(value); }) + matches(regex) { + return this.satisfies(value => value === null || value === undefined || value.length === 0 || regex.test(value)) .withMessageKey('matches'); - }; + } /** * Applies the "email" rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRules.prototype.email = function () { + email() { // 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'); - }; + } /** * Applies the "minLength" STRING validation rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRules.prototype.minLength = function (length) { - return this.satisfies(function (value) { return value === null || value === undefined || value.length === 0 || value.length >= length; }, { length: length }) + minLength(length) { + return this.satisfies((value) => value === null || value === undefined || value.length === 0 || value.length >= length, { length }) .withMessageKey('minLength'); - }; + } /** * Applies the "maxLength" STRING validation rule to the property. * null, undefined and empty-string values are considered valid. */ - FluentRules.prototype.maxLength = function (length) { - return this.satisfies(function (value) { return value === null || value === undefined || value.length === 0 || value.length <= length; }, { length: length }) + maxLength(length) { + return this.satisfies((value) => value === null || value === undefined || value.length === 0 || value.length <= length, { length }) .withMessageKey('maxLength'); - }; + } /** * Applies the "minItems" ARRAY validation rule to the property. * null and undefined values are considered valid. */ - FluentRules.prototype.minItems = function (count) { - return this.satisfies(function (value) { return value === null || value === undefined || value.length >= count; }, { count: count }) + minItems(count) { + return this.satisfies((value) => value === null || value === undefined || value.length >= count, { count }) .withMessageKey('minItems'); - }; + } /** * Applies the "maxItems" ARRAY validation rule to the property. * null and undefined values are considered valid. */ - FluentRules.prototype.maxItems = function (count) { - return this.satisfies(function (value) { return value === null || value === undefined || value.length <= count; }, { count: count }) + maxItems(count) { + return this.satisfies((value) => value === null || value === undefined || value.length <= count, { count }) .withMessageKey('maxItems'); - }; + } /** * Applies the "equals" validation rule to the property. * null and undefined values are considered valid. */ - FluentRules.prototype.equals = function (expectedValue) { - return this.satisfies(function (value) { return value === null || value === undefined || value === '' || value === expectedValue; }, { expectedValue: expectedValue }) + equals(expectedValue) { + return this.satisfies(value => value === null || value === undefined || value === '' || value === expectedValue, { expectedValue }) .withMessageKey('equals'); - }; - return FluentRules; -}()); -export { FluentRules }; + } +} FluentRules.customRules = {}; /** * Part of the fluent rule API. Enables targeting properties and objects with rules. */ -var FluentEnsure = (function () { - function FluentEnsure(parser) { +export class FluentEnsure { + constructor(parser) { this.parser = parser; /** * Rules that have been defined using the fluent API. @@ -325,65 +301,61 @@ var FluentEnsure = (function () { * @param property The property to target. Can be the property name or a property accessor * function. */ - FluentEnsure.prototype.ensure = function (property) { + ensure(property) { this.assertInitialized(); return new FluentRules(this, this.parser, this.parser.parseProperty(property)); - }; + } /** * Targets an object with validation rules. */ - FluentEnsure.prototype.ensureObject = function () { + ensureObject() { this.assertInitialized(); return new FluentRules(this, this.parser, { name: null, displayName: null }); - }; + } /** * Applies the rules to a class or object, making them discoverable by the StandardValidator. * @param target A class or object. */ - FluentEnsure.prototype.on = function (target) { + on(target) { Rules.set(target, this.rules); return this; - }; + } /** * Adds a rule definition to the sequenced ruleset. */ - FluentEnsure.prototype._addRule = function (rule) { + _addRule(rule) { while (this.rules.length < rule.sequence + 1) { this.rules.push([]); } this.rules[rule.sequence].push(rule); - }; - FluentEnsure.prototype.assertInitialized = function () { + } + assertInitialized() { if (this.parser) { return; } - throw new Error("Did you forget to add \".plugin('aurelia-validation)\" to your main.js?"); - }; - return FluentEnsure; -}()); -export { FluentEnsure }; + throw new Error(`Did you forget to add ".plugin('aurelia-validation)" to your main.js?`); + } +} /** * Fluent rule definition API. */ -var ValidationRules = (function () { - function ValidationRules() { - } - ValidationRules.initialize = function (parser) { +export class ValidationRules { + static initialize(parser) { ValidationRules.parser = parser; - }; + } /** * Target a property with validation rules. * @param property The property to target. Can be the property name or a property accessor function. */ - ValidationRules.ensure = function (property) { + static ensure(property) { return new FluentEnsure(ValidationRules.parser).ensure(property); - }; + } /** * Targets an object with validation rules. */ - ValidationRules.ensureObject = function () { + static ensureObject() { return new FluentEnsure(ValidationRules.parser).ensureObject(); - }; + } /** * Defines a custom rule. * @param name The name of the custom rule. Also serves as the message key. @@ -392,25 +364,23 @@ var ValidationRules = (function () { * @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) { + static customRule(name, condition, message, argsToConfig) { validationMessages[name] = message; - FluentRules.customRules[name] = { condition: condition, argsToConfig: argsToConfig }; - }; + FluentRules.customRules[name] = { condition, argsToConfig }; + } /** * Returns rules with the matching tag. * @param rules The rules to search. * @param tag The tag to search for. */ - ValidationRules.taggedRules = function (rules, tag) { - return rules.map(function (x) { return x.filter(function (r) { return r.tag === tag; }); }); - }; + static taggedRules(rules, tag) { + return rules.map(x => x.filter(r => r.tag === tag)); + } /** * Removes the rules from a class or object. * @param target A class or object. */ - ValidationRules.off = function (target) { + static off(target) { Rules.unset(target); - }; - return ValidationRules; -}()); -export { ValidationRules }; + } +} diff --git a/dist/es2015/property-info.js b/dist/es2015/property-info.js index 75edf715..60963a5f 100644 --- a/dist/es2015/property-info.js +++ b/dist/es2015/property-info.js @@ -1,11 +1,11 @@ import { AccessMember, AccessScope, AccessKeyed, BindingBehavior, ValueConverter } from 'aurelia-binding'; function getObject(expression, objectExpression, source) { - var value = objectExpression.evaluate(source, null); + let value = objectExpression.evaluate(source, null); if (value === null || value === undefined || value instanceof Object) { return value; } /* tslint:disable */ - throw new Error("The '" + objectExpression + "' part of '" + expression + "' evaluates to " + value + " instead of an object, null or undefined."); + throw new Error(`The '${objectExpression}' part of '${expression}' evaluates to ${value} instead of an object, null or undefined.`); /* tslint:enable */ } /** @@ -14,12 +14,12 @@ function getObject(expression, objectExpression, source) { * @param source The scope */ export function getPropertyInfo(expression, source) { - var originalExpression = expression; + const originalExpression = expression; while (expression instanceof BindingBehavior || expression instanceof ValueConverter) { expression = expression.expression; } - var object; - var propertyName; + let object; + let propertyName; if (expression instanceof AccessScope) { object = source.bindingContext; propertyName = expression.name; @@ -33,10 +33,10 @@ export function getPropertyInfo(expression, source) { propertyName = expression.key.evaluate(source); } else { - throw new Error("Expression '" + originalExpression + "' is not compatible with the validate binding-behavior."); + 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 }; + return { object, propertyName }; } diff --git a/dist/es2015/validate-binding-behavior-base.js b/dist/es2015/validate-binding-behavior-base.js index 72af199f..991f7c52 100644 --- a/dist/es2015/validate-binding-behavior-base.js +++ b/dist/es2015/validate-binding-behavior-base.js @@ -5,8 +5,8 @@ import { validateTrigger } from './validate-trigger'; /** * Binding behavior. Indicates the bound property should be validated. */ -var ValidateBindingBehaviorBase = (function () { - function ValidateBindingBehaviorBase(taskQueue) { +export class ValidateBindingBehaviorBase { + constructor(taskQueue) { this.taskQueue = taskQueue; } /** @@ -15,31 +15,30 @@ var ValidateBindingBehaviorBase = (function () { * 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; + getTarget(binding, view) { + const target = binding.target; // DOM element if (target instanceof Element) { return target; } // custom element or custom attribute - for (var i = 0, ii = view.controllers.length; i < ii; i++) { - var controller = view.controllers[i]; + for (let i = 0, ii = view.controllers.length; i < ii; i++) { + let controller = view.controllers[i]; if (controller.viewModel === target) { - var element = controller.container.get(DOM.Element); + const element = controller.container.get(DOM.Element); if (element) { return element; } - throw new Error("Unable to locate target element for \"" + binding.sourceExpression + "\"."); + throw new Error(`Unable to locate target element for "${binding.sourceExpression}".`); } } - throw new Error("Unable to locate target element for \"" + binding.sourceExpression + "\"."); - }; - ValidateBindingBehaviorBase.prototype.bind = function (binding, source, rulesOrController, rules) { - var _this = this; + throw new Error(`Unable to locate target element for "${binding.sourceExpression}".`); + } + bind(binding, source, rulesOrController, rules) { // identify the target element. - var target = this.getTarget(binding, source); + const target = this.getTarget(binding, source); // locate the controller. - var controller; + let controller; if (rulesOrController instanceof ValidationController) { controller = rulesOrController; } @@ -48,11 +47,11 @@ var ValidateBindingBehaviorBase = (function () { rules = rulesOrController; } if (controller === null) { - throw new Error("A ValidationController has not been registered."); + throw new Error(`A ValidationController has not been registered.`); } controller.registerBinding(binding, target, rules); binding.validationController = controller; - var trigger = this.getValidateTrigger(controller); + const trigger = this.getValidateTrigger(controller); /* tslint:disable:no-bitwise */ if (trigger & validateTrigger.change) { /* tslint:enable:no-bitwise */ @@ -67,8 +66,8 @@ var ValidateBindingBehaviorBase = (function () { /* tslint:disable:no-bitwise */ if (trigger & validateTrigger.blur) { /* tslint:enable:no-bitwise */ - binding.validateBlurHandler = function () { - _this.taskQueue.queueMicroTask(function () { return controller.validateBinding(binding); }); + binding.validateBlurHandler = () => { + this.taskQueue.queueMicroTask(() => controller.validateBinding(binding)); }; binding.validateTarget = target; target.addEventListener('blur', binding.validateBlurHandler); @@ -82,8 +81,8 @@ var ValidateBindingBehaviorBase = (function () { this.validationController.resetBinding(this); }; } - }; - ValidateBindingBehaviorBase.prototype.unbind = function (binding) { + } + unbind(binding) { // reset the binding to it's original state. if (binding.standardUpdateSource) { binding.updateSource = binding.standardUpdateSource; @@ -100,7 +99,5 @@ var ValidateBindingBehaviorBase = (function () { } binding.validationController.unregisterBinding(binding); binding.validationController = null; - }; - return ValidateBindingBehaviorBase; -}()); -export { ValidateBindingBehaviorBase }; + } +} diff --git a/dist/es2015/validate-binding-behavior.js b/dist/es2015/validate-binding-behavior.js index 0ecbd5a9..318d227a 100644 --- a/dist/es2015/validate-binding-behavior.js +++ b/dist/es2015/validate-binding-behavior.js @@ -1,8 +1,3 @@ -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -}; import { TaskQueue } from 'aurelia-task-queue'; import { validateTrigger } from './validate-trigger'; import { ValidateBindingBehaviorBase } from './validate-binding-behavior-base'; @@ -11,82 +6,52 @@ import { ValidateBindingBehaviorBase } from './validate-binding-behavior-base'; * when the validate trigger specified by the associated controller's * validateTrigger property occurs. */ -var ValidateBindingBehavior = (function (_super) { - __extends(ValidateBindingBehavior, _super); - function ValidateBindingBehavior() { - return _super.apply(this, arguments) || this; - } - ValidateBindingBehavior.prototype.getValidateTrigger = function (controller) { +export class ValidateBindingBehavior extends ValidateBindingBehaviorBase { + getValidateTrigger(controller) { return controller.validateTrigger; - }; - return ValidateBindingBehavior; -}(ValidateBindingBehaviorBase)); -export { ValidateBindingBehavior }; + } +} ValidateBindingBehavior.inject = [TaskQueue]; /** * Binding behavior. Indicates the bound property will be validated * manually, by calling controller.validate(). No automatic validation * triggered by data-entry or blur will occur. */ -var ValidateManuallyBindingBehavior = (function (_super) { - __extends(ValidateManuallyBindingBehavior, _super); - function ValidateManuallyBindingBehavior() { - return _super.apply(this, arguments) || this; - } - ValidateManuallyBindingBehavior.prototype.getValidateTrigger = function () { +export class ValidateManuallyBindingBehavior extends ValidateBindingBehaviorBase { + getValidateTrigger() { return validateTrigger.manual; - }; - return ValidateManuallyBindingBehavior; -}(ValidateBindingBehaviorBase)); -export { ValidateManuallyBindingBehavior }; + } +} ValidateManuallyBindingBehavior.inject = [TaskQueue]; /** * Binding behavior. Indicates the bound property should be validated * when the associated element blurs. */ -var ValidateOnBlurBindingBehavior = (function (_super) { - __extends(ValidateOnBlurBindingBehavior, _super); - function ValidateOnBlurBindingBehavior() { - return _super.apply(this, arguments) || this; - } - ValidateOnBlurBindingBehavior.prototype.getValidateTrigger = function () { +export class ValidateOnBlurBindingBehavior extends ValidateBindingBehaviorBase { + getValidateTrigger() { return validateTrigger.blur; - }; - return ValidateOnBlurBindingBehavior; -}(ValidateBindingBehaviorBase)); -export { ValidateOnBlurBindingBehavior }; + } +} ValidateOnBlurBindingBehavior.inject = [TaskQueue]; /** * Binding behavior. Indicates the bound property should be validated * when the associated element is changed by the user, causing a change * to the model. */ -var ValidateOnChangeBindingBehavior = (function (_super) { - __extends(ValidateOnChangeBindingBehavior, _super); - function ValidateOnChangeBindingBehavior() { - return _super.apply(this, arguments) || this; - } - ValidateOnChangeBindingBehavior.prototype.getValidateTrigger = function () { +export class ValidateOnChangeBindingBehavior extends ValidateBindingBehaviorBase { + getValidateTrigger() { return validateTrigger.change; - }; - return ValidateOnChangeBindingBehavior; -}(ValidateBindingBehaviorBase)); -export { ValidateOnChangeBindingBehavior }; + } +} ValidateOnChangeBindingBehavior.inject = [TaskQueue]; /** * Binding behavior. Indicates the bound property should be validated * when the associated element blurs or is changed by the user, causing * a change to the model. */ -var ValidateOnChangeOrBlurBindingBehavior = (function (_super) { - __extends(ValidateOnChangeOrBlurBindingBehavior, _super); - function ValidateOnChangeOrBlurBindingBehavior() { - return _super.apply(this, arguments) || this; - } - ValidateOnChangeOrBlurBindingBehavior.prototype.getValidateTrigger = function () { +export class ValidateOnChangeOrBlurBindingBehavior extends ValidateBindingBehaviorBase { + getValidateTrigger() { return validateTrigger.changeOrBlur; - }; - return ValidateOnChangeOrBlurBindingBehavior; -}(ValidateBindingBehaviorBase)); -export { ValidateOnChangeOrBlurBindingBehavior }; + } +} ValidateOnChangeOrBlurBindingBehavior.inject = [TaskQueue]; diff --git a/dist/es2015/validate-result.js b/dist/es2015/validate-result.js index 7c21786e..81fbc4df 100644 --- a/dist/es2015/validate-result.js +++ b/dist/es2015/validate-result.js @@ -1,15 +1,16 @@ /** * The result of validating an individual validation rule. */ -var ValidateResult = (function () { +/** + * The result of validating an individual validation rule. + */ export class ValidateResult { /** * @param rule The rule associated with the result. Validator implementation specific. * @param object The object that was validated. * @param propertyName The name of the property that was validated. * @param error The error, if the result is a validation error. */ - function ValidateResult(rule, object, propertyName, valid, message) { - if (message === void 0) { message = null; } + constructor(rule, object, propertyName, valid, message = null) { this.rule = rule; this.object = object; this.propertyName = propertyName; @@ -17,10 +18,8 @@ var ValidateResult = (function () { this.message = message; this.id = ValidateResult.nextId++; } - ValidateResult.prototype.toString = function () { + toString() { return this.valid ? 'Valid.' : this.message; - }; - return ValidateResult; -}()); -export { ValidateResult }; + } +} ValidateResult.nextId = 0; diff --git a/dist/es2015/validate-trigger.js b/dist/es2015/validate-trigger.js index 1ccec739..5cc334cc 100644 --- a/dist/es2015/validate-trigger.js +++ b/dist/es2015/validate-trigger.js @@ -3,7 +3,7 @@ */ /** * Validation triggers. - */ export var validateTrigger = { + */ export const validateTrigger = { /** * Manual validation. Use the controller's `validate()` and `reset()` methods * to validate all bindings. diff --git a/dist/es2015/validation-controller-factory.js b/dist/es2015/validation-controller-factory.js index 5cb1c90b..4f431d2b 100644 --- a/dist/es2015/validation-controller-factory.js +++ b/dist/es2015/validation-controller-factory.js @@ -3,32 +3,30 @@ import { Validator } from './validator'; /** * Creates ValidationController instances. */ -var ValidationControllerFactory = (function () { - function ValidationControllerFactory(container) { +export class ValidationControllerFactory { + constructor(container) { this.container = container; } - ValidationControllerFactory.get = function (container) { + static get(container) { return new ValidationControllerFactory(container); - }; + } /** * Creates a new controller instance. */ - ValidationControllerFactory.prototype.create = function (validator) { + create(validator) { if (!validator) { validator = this.container.get(Validator); } return new ValidationController(validator); - }; + } /** * Creates a new controller and registers it in the current element's container so that it's * available to the validate binding behavior and renderers. */ - ValidationControllerFactory.prototype.createForCurrentScope = function (validator) { - var controller = this.create(validator); + createForCurrentScope(validator) { + const controller = this.create(validator); this.container.registerInstance(ValidationController, controller); return controller; - }; - return ValidationControllerFactory; -}()); -export { ValidationControllerFactory }; + } +} ValidationControllerFactory['protocol:aurelia:resolver'] = true; diff --git a/dist/es2015/validation-controller.js b/dist/es2015/validation-controller.js index b04b98ae..e9191bf1 100644 --- a/dist/es2015/validation-controller.js +++ b/dist/es2015/validation-controller.js @@ -7,8 +7,8 @@ import { ValidateResult } from './validate-result'; * Manages a set of bindings, renderers and objects. * Exposes the current list of validation results for binding purposes. */ -var ValidationController = (function () { - function ValidationController(validator) { +export class ValidationController { + constructor(validator) { this.validator = validator; // Registered bindings (via the validate binding behavior) this.bindings = new Map(); @@ -42,250 +42,238 @@ var ValidationController = (function () { * @param object The object. * @param rules Optional. The rules. If rules aren't supplied the Validator implementation will lookup the rules. */ - ValidationController.prototype.addObject = function (object, rules) { + addObject(object, rules) { this.objects.set(object, rules); - }; + } /** * Removes an object from the set of objects that should be validated when validate is called. * @param object The object. */ - ValidationController.prototype.removeObject = function (object) { + removeObject(object) { this.objects.delete(object); - this.processResultDelta('reset', this.results.filter(function (result) { return result.object === object; }), []); - }; + this.processResultDelta('reset', this.results.filter(result => result.object === object), []); + } /** * Adds and renders an error. */ - ValidationController.prototype.addError = function (message, object, propertyName) { - if (propertyName === void 0) { propertyName = null; } - var result = new ValidateResult({}, object, propertyName, false, message); + addError(message, object, propertyName = null) { + const result = new ValidateResult({}, object, propertyName, false, message); this.processResultDelta('validate', [], [result]); return result; - }; + } /** * Removes and unrenders an error. */ - ValidationController.prototype.removeError = function (result) { + removeError(result) { if (this.results.indexOf(result) !== -1) { this.processResultDelta('reset', [result], []); } - }; + } /** * Adds a renderer. * @param renderer The renderer. */ - ValidationController.prototype.addRenderer = function (renderer) { - var _this = this; + addRenderer(renderer) { this.renderers.push(renderer); renderer.render({ kind: 'validate', - render: this.results.map(function (result) { return ({ result: result, elements: _this.elements.get(result) }); }), + render: this.results.map(result => ({ result, elements: this.elements.get(result) })), unrender: [] }); - }; + } /** * Removes a renderer. * @param renderer The renderer. */ - ValidationController.prototype.removeRenderer = function (renderer) { - var _this = this; + removeRenderer(renderer) { this.renderers.splice(this.renderers.indexOf(renderer), 1); renderer.render({ kind: 'reset', render: [], - unrender: this.results.map(function (result) { return ({ result: result, elements: _this.elements.get(result) }); }) + unrender: this.results.map(result => ({ result, elements: this.elements.get(result) })) }); - }; + } /** * Registers a binding with the controller. * @param binding The binding instance. * @param target The DOM element. * @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, propertyInfo: null }); - }; + registerBinding(binding, target, rules) { + this.bindings.set(binding, { target, rules, propertyInfo: null }); + } /** * Unregisters a binding with the controller. * @param binding The binding instance. */ - ValidationController.prototype.unregisterBinding = function (binding) { + unregisterBinding(binding) { this.resetBinding(binding); this.bindings.delete(binding); - }; + } /** * Interprets the instruction and returns a predicate that will identify * relevant results in the list of rendered validation results. */ - ValidationController.prototype.getInstructionPredicate = function (instruction) { - var _this = this; + getInstructionPredicate(instruction) { if (instruction) { - var object_1 = instruction.object, propertyName_1 = instruction.propertyName, rules_1 = instruction.rules; - var predicate_1; + const { object, propertyName, rules } = instruction; + let predicate; if (instruction.propertyName) { - predicate_1 = function (x) { return x.object === object_1 && x.propertyName === propertyName_1; }; + predicate = x => x.object === object && x.propertyName === propertyName; } else { - predicate_1 = function (x) { return x.object === object_1; }; + predicate = x => x.object === object; } - if (rules_1) { - return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); }; + if (rules) { + return x => predicate(x) && this.validator.ruleExists(rules, x.rule); } - return predicate_1; + return predicate; } else { - return function () { return true; }; + return () => true; } - }; + } /** * Validates and renders results. * @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; + validate(instruction) { // Get a function that will process the validation instruction. - var execute; + let execute; if (instruction) { - var object_2 = instruction.object, propertyName_2 = instruction.propertyName, rules_2 = instruction.rules; + let { object, propertyName, rules } = instruction; // if rules were not specified, check the object map. - rules_2 = rules_2 || this.objects.get(object_2); + rules = rules || this.objects.get(object); // property specified? if (instruction.propertyName === undefined) { // validate the specified object. - execute = function () { return _this.validator.validateObject(object_2, rules_2); }; + execute = () => this.validator.validateObject(object, rules); } else { // validate the specified property. - execute = function () { return _this.validator.validateProperty(object_2, propertyName_2, rules_2); }; + execute = () => this.validator.validateProperty(object, propertyName, rules); } } else { // validate all objects and bindings. - execute = function () { - var promises = []; - for (var _i = 0, _a = Array.from(_this.objects); _i < _a.length; _i++) { - var _b = _a[_i], object = _b[0], rules = _b[1]; - promises.push(_this.validator.validateObject(object, rules)); + execute = () => { + const promises = []; + for (let [object, rules] of Array.from(this.objects)) { + promises.push(this.validator.validateObject(object, rules)); } - 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 propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); - if (!propertyInfo || _this.objects.has(propertyInfo.object)) { + for (let [binding, { rules }] of Array.from(this.bindings)) { + const propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || this.objects.has(propertyInfo.object)) { continue; } - promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); + promises.push(this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); } - return Promise.all(promises).then(function (resultSets) { return resultSets.reduce(function (a, b) { return a.concat(b); }, []); }); + return Promise.all(promises).then(resultSets => resultSets.reduce((a, b) => a.concat(b), [])); }; } // Wait for any existing validation to finish, execute the instruction, render the results. this.validating = true; - var returnPromise = this.finishValidating + let returnPromise = this.finishValidating .then(execute) - .then(function (newResults) { - var predicate = _this.getInstructionPredicate(instruction); - var oldResults = _this.results.filter(predicate); - _this.processResultDelta('validate', oldResults, newResults); - if (returnPromise === _this.finishValidating) { - _this.validating = false; + .then((newResults) => { + const predicate = this.getInstructionPredicate(instruction); + const oldResults = this.results.filter(predicate); + this.processResultDelta('validate', oldResults, newResults); + if (returnPromise === this.finishValidating) { + this.validating = false; } - var result = { - instruction: instruction, - valid: newResults.find(function (x) { return !x.valid; }) === undefined, + const result = { + instruction, + valid: newResults.find(x => !x.valid) === undefined, results: newResults }; return result; }) - .catch(function (exception) { + .catch(exception => { // recover, to enable subsequent calls to validate() - _this.validating = false; - _this.finishValidating = Promise.resolve(); + this.validating = false; + this.finishValidating = Promise.resolve(); return Promise.reject(exception); }); this.finishValidating = returnPromise; return returnPromise; - }; + } /** * Resets any rendered validation results (unrenders). * @param instruction Optional. Instructions on what to reset. If unspecified all rendered results * will be unrendered. */ - ValidationController.prototype.reset = function (instruction) { - var predicate = this.getInstructionPredicate(instruction); - var oldResults = this.results.filter(predicate); + reset(instruction) { + const predicate = this.getInstructionPredicate(instruction); + const oldResults = this.results.filter(predicate); this.processResultDelta('reset', oldResults, []); - }; + } /** * Gets the elements associated with an object and propertyName (if any). */ - ValidationController.prototype.getAssociatedElements = function (_a) { - var object = _a.object, propertyName = _a.propertyName; - 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 propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + getAssociatedElements({ object, propertyName }) { + const elements = []; + for (let [binding, { target }] of Array.from(this.bindings)) { + const propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { elements.push(target); } } return elements; - }; - ValidationController.prototype.processResultDelta = function (kind, oldResults, newResults) { + } + processResultDelta(kind, oldResults, newResults) { // prepare the instruction. - var instruction = { - kind: kind, + const instruction = { + kind, render: [], unrender: [] }; // create a shallow copy of newResults so we can mutate it without causing side-effects. newResults = newResults.slice(0); - var _loop_1 = function (oldResult) { + // create unrender instructions from the old results. + for (let oldResult of oldResults) { // get the elements associated with the old result. - var elements = this_1.elements.get(oldResult); + const elements = this.elements.get(oldResult); // remove the old result from the element map. - this_1.elements.delete(oldResult); + this.elements.delete(oldResult); // create the unrender instruction. - instruction.unrender.push({ result: oldResult, elements: elements }); + instruction.unrender.push({ result: oldResult, elements }); // determine if there's a corresponding new result for the old result we are unrendering. - var newResultIndex = newResults.findIndex(function (x) { return x.rule === oldResult.rule && x.object === oldResult.object && x.propertyName === oldResult.propertyName; }); + const newResultIndex = newResults.findIndex(x => x.rule === oldResult.rule && x.object === oldResult.object && x.propertyName === oldResult.propertyName); if (newResultIndex === -1) { // no corresponding new result... simple remove. - this_1.results.splice(this_1.results.indexOf(oldResult), 1); + this.results.splice(this.results.indexOf(oldResult), 1); if (!oldResult.valid) { - this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); + this.errors.splice(this.errors.indexOf(oldResult), 1); } } else { // there is a corresponding new result... - var newResult = newResults.splice(newResultIndex, 1)[0]; + const newResult = newResults.splice(newResultIndex, 1)[0]; // get the elements that are associated with the new result. - var elements_1 = this_1.getAssociatedElements(newResult); - this_1.elements.set(newResult, elements_1); + const elements = this.getAssociatedElements(newResult); + this.elements.set(newResult, elements); // create a render instruction for the new result. - instruction.render.push({ result: newResult, elements: elements_1 }); + instruction.render.push({ result: newResult, elements }); // do an in-place replacement of the old result with the new result. // this ensures any repeats bound to this.results will not thrash. - this_1.results.splice(this_1.results.indexOf(oldResult), 1, newResult); - if (newResult.valid) { - this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); + this.results.splice(this.results.indexOf(oldResult), 1, newResult); + if (!oldResult.valid && newResult.valid) { + this.errors.splice(this.errors.indexOf(oldResult), 1); } - else { - this_1.errors.splice(this_1.errors.indexOf(oldResult), 1, newResult); + else if (!oldResult.valid && !newResult.valid) { + this.errors.splice(this.errors.indexOf(oldResult), 1, newResult); + } + else if (!newResult.valid) { + this.errors.push(newResult); } } - }; - var this_1 = this; - // create unrender instructions from the old results. - for (var _i = 0, oldResults_1 = oldResults; _i < oldResults_1.length; _i++) { - var oldResult = oldResults_1[_i]; - _loop_1(oldResult); } // create render instructions from the remaining new results. - for (var _a = 0, newResults_1 = newResults; _a < newResults_1.length; _a++) { - var result = newResults_1[_a]; - var elements = this.getAssociatedElements(result); - instruction.render.push({ result: result, elements: elements }); + for (let result of newResults) { + const elements = this.getAssociatedElements(result); + instruction.render.push({ result, elements }); this.elements.set(result, elements); this.results.push(result); if (!result.valid) { @@ -293,21 +281,20 @@ var ValidationController = (function () { } } // render. - for (var _b = 0, _c = this.renderers; _b < _c.length; _b++) { - var renderer = _c[_b]; + for (let renderer of this.renderers) { renderer.render(instruction); } - }; + } /** * Validates the property associated with a binding. */ - ValidationController.prototype.validateBinding = function (binding) { + validateBinding(binding) { if (!binding.isBound) { return; } - var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); - var rules = undefined; - var registeredBinding = this.bindings.get(binding); + let propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + let rules = undefined; + const registeredBinding = this.bindings.get(binding); if (registeredBinding) { rules = registeredBinding.rules; registeredBinding.propertyInfo = propertyInfo; @@ -315,15 +302,15 @@ var ValidationController = (function () { if (!propertyInfo) { return; } - var object = propertyInfo.object, propertyName = propertyInfo.propertyName; - this.validate({ object: object, propertyName: propertyName, rules: rules }); - }; + const { object, propertyName } = propertyInfo; + this.validate({ object, propertyName, rules }); + } /** * Resets the results for a property associated with a binding. */ - ValidationController.prototype.resetBinding = function (binding) { - var registeredBinding = this.bindings.get(binding); - var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + resetBinding(binding) { + const registeredBinding = this.bindings.get(binding); + let propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); if (!propertyInfo && registeredBinding) { propertyInfo = registeredBinding.propertyInfo; } @@ -333,10 +320,8 @@ var ValidationController = (function () { if (!propertyInfo) { return; } - var object = propertyInfo.object, propertyName = propertyInfo.propertyName; - this.reset({ object: object, propertyName: propertyName }); - }; - return ValidationController; -}()); -export { ValidationController }; + const { object, propertyName } = propertyInfo; + this.reset({ object, propertyName }); + } +} ValidationController.inject = [Validator]; diff --git a/dist/es2015/validation-errors-custom-attribute.js b/dist/es2015/validation-errors-custom-attribute.js index afd76aad..46765f57 100644 --- a/dist/es2015/validation-errors-custom-attribute.js +++ b/dist/es2015/validation-errors-custom-attribute.js @@ -8,14 +8,14 @@ import { bindingMode } from 'aurelia-binding'; import { Lazy } from 'aurelia-dependency-injection'; import { customAttribute } from 'aurelia-templating'; import { ValidationController } from './validation-controller'; -var ValidationErrorsCustomAttribute = (function () { - function ValidationErrorsCustomAttribute(boundaryElement, controllerAccessor) { +let ValidationErrorsCustomAttribute = class ValidationErrorsCustomAttribute { + constructor(boundaryElement, controllerAccessor) { this.boundaryElement = boundaryElement; this.controllerAccessor = controllerAccessor; this.errors = []; } - ValidationErrorsCustomAttribute.prototype.sort = function () { - this.errors.sort(function (a, b) { + sort() { + this.errors.sort((a, b) => { if (a.targets[0] === b.targets[0]) { return 0; } @@ -23,45 +23,37 @@ var ValidationErrorsCustomAttribute = (function () { return a.targets[0].compareDocumentPosition(b.targets[0]) & 2 ? 1 : -1; /* tslint:enable:no-bitwise */ }); - }; - ValidationErrorsCustomAttribute.prototype.interestingElements = function (elements) { - var _this = this; - return elements.filter(function (e) { return _this.boundaryElement.contains(e); }); - }; - ValidationErrorsCustomAttribute.prototype.render = function (instruction) { - var _loop_1 = function (result) { - var index = this_1.errors.findIndex(function (x) { return x.error === result; }); + } + interestingElements(elements) { + return elements.filter(e => this.boundaryElement.contains(e)); + } + render(instruction) { + for (let { result } of instruction.unrender) { + const index = this.errors.findIndex(x => x.error === result); if (index !== -1) { - this_1.errors.splice(index, 1); + this.errors.splice(index, 1); } - }; - var this_1 = this; - for (var _i = 0, _a = instruction.unrender; _i < _a.length; _i++) { - var result = _a[_i].result; - _loop_1(result); } - for (var _b = 0, _c = instruction.render; _b < _c.length; _b++) { - var _d = _c[_b], result = _d.result, elements = _d.elements; + for (let { result, elements } of instruction.render) { if (result.valid) { continue; } - var targets = this.interestingElements(elements); + const targets = this.interestingElements(elements); if (targets.length) { - this.errors.push({ error: result, targets: targets }); + this.errors.push({ error: result, targets }); } } this.sort(); this.value = this.errors; - }; - ValidationErrorsCustomAttribute.prototype.bind = function () { + } + bind() { this.controllerAccessor().addRenderer(this); this.value = this.errors; - }; - ValidationErrorsCustomAttribute.prototype.unbind = function () { + } + unbind() { this.controllerAccessor().removeRenderer(this); - }; - return ValidationErrorsCustomAttribute; -}()); + } +}; ValidationErrorsCustomAttribute.inject = [Element, Lazy.of(ValidationController)]; ValidationErrorsCustomAttribute = __decorate([ customAttribute('validation-errors', bindingMode.twoWay) diff --git a/dist/es2015/validation-renderer-custom-attribute.js b/dist/es2015/validation-renderer-custom-attribute.js index b5eee48e..83b6c5d4 100644 --- a/dist/es2015/validation-renderer-custom-attribute.js +++ b/dist/es2015/validation-renderer-custom-attribute.js @@ -1,20 +1,16 @@ import { ValidationController } from './validation-controller'; -var ValidationRendererCustomAttribute = (function () { - function ValidationRendererCustomAttribute() { - } - ValidationRendererCustomAttribute.prototype.created = function (view) { +export class ValidationRendererCustomAttribute { + created(view) { this.container = view.container; - }; - ValidationRendererCustomAttribute.prototype.bind = function () { + } + bind() { this.controller = this.container.get(ValidationController); this.renderer = this.container.get(this.value); this.controller.addRenderer(this.renderer); - }; - ValidationRendererCustomAttribute.prototype.unbind = function () { + } + unbind() { this.controller.removeRenderer(this.renderer); this.controller = null; this.renderer = null; - }; - return ValidationRendererCustomAttribute; -}()); -export { ValidationRendererCustomAttribute }; + } +} diff --git a/dist/es2015/validator.js b/dist/es2015/validator.js index 826b2c24..2fd07a54 100644 --- a/dist/es2015/validator.js +++ b/dist/es2015/validator.js @@ -1,9 +1,5 @@ /** * Validates objects and properties. */ -var Validator = (function () { - function Validator() { - } - return Validator; -}()); -export { Validator }; +export class Validator { +} diff --git a/dist/native-modules/aurelia-validation.d.ts b/dist/native-modules/aurelia-validation.d.ts new file mode 100644 index 00000000..9897cc10 --- /dev/null +++ b/dist/native-modules/aurelia-validation.d.ts @@ -0,0 +1,43 @@ +export * from './controller-validate-result'; +export * from './property-info'; +export * from './validate-binding-behavior'; +export * from './validate-instruction'; +export * from './validate-result'; +export * from './validate-trigger'; +export * from './validation-controller'; +export * from './validation-controller-factory'; +export * from './validation-errors-custom-attribute'; +export * from './validation-renderer-custom-attribute'; +export * from './validation-renderer'; +export * from './validator'; +export * from './implementation/rule'; +export * from './implementation/rules'; +export * from './implementation/standard-validator'; +export * from './implementation/validation-messages'; +export * from './implementation/validation-parser'; +export * from './implementation/validation-rules'; +import { Container } from 'aurelia-dependency-injection'; +import { Validator } from './validator'; +/** + * Aurelia Validation Configuration API + */ +export declare class AureliaValidationConfiguration { + private validatorType; + /** + * Use a custom Validator implementation. + */ + customValidator(type: { + new (...args: any[]): Validator; + }): void; + /** + * Applies the configuration. + */ + apply(container: Container): void; +} +/** + * Configures the plugin. + */ +export declare function configure(frameworkConfig: { + container: Container; + globalResources: (...resources: string[]) => any; +}, callback?: (config: AureliaValidationConfiguration) => void): void; diff --git a/dist/native-modules/aurelia-validation.js b/dist/native-modules/aurelia-validation.js new file mode 100644 index 00000000..0e7313fd --- /dev/null +++ b/dist/native-modules/aurelia-validation.js @@ -0,0 +1,59 @@ +// Exports +export * from './property-info'; +export * from './validate-binding-behavior'; +export * from './validate-result'; +export * from './validate-trigger'; +export * from './validation-controller'; +export * from './validation-controller-factory'; +export * from './validation-errors-custom-attribute'; +export * from './validation-renderer-custom-attribute'; +export * from './validator'; +export * from './implementation/rules'; +export * from './implementation/standard-validator'; +export * from './implementation/validation-messages'; +export * from './implementation/validation-parser'; +export * from './implementation/validation-rules'; +import { Validator } from './validator'; +import { StandardValidator } from './implementation/standard-validator'; +import { ValidationParser } from './implementation/validation-parser'; +import { ValidationRules } from './implementation/validation-rules'; +/** + * Aurelia Validation Configuration API + */ +var AureliaValidationConfiguration = (function () { + function AureliaValidationConfiguration() { + this.validatorType = StandardValidator; + } + /** + * Use a custom Validator implementation. + */ + AureliaValidationConfiguration.prototype.customValidator = function (type) { + this.validatorType = type; + }; + /** + * Applies the configuration. + */ + AureliaValidationConfiguration.prototype.apply = function (container) { + var validator = container.get(this.validatorType); + container.registerInstance(Validator, validator); + }; + return AureliaValidationConfiguration; +}()); +export { AureliaValidationConfiguration }; +/** + * Configures the plugin. + */ +export function configure(frameworkConfig, callback) { + // the fluent rule definition API needs the parser to translate messages + // to interpolation expressions. + var parser = frameworkConfig.container.get(ValidationParser); + ValidationRules.initialize(parser); + // configure... + var config = new AureliaValidationConfiguration(); + if (callback instanceof Function) { + callback(config); + } + config.apply(frameworkConfig.container); + // globalize the behaviors. + frameworkConfig.globalResources('./validate-binding-behavior', './validation-errors-custom-attribute', './validation-renderer-custom-attribute'); +} diff --git a/dist/native-modules/controller-validate-result.d.ts b/dist/native-modules/controller-validate-result.d.ts new file mode 100644 index 00000000..5f814ed0 --- /dev/null +++ b/dist/native-modules/controller-validate-result.d.ts @@ -0,0 +1,19 @@ +import { ValidateResult } from './validate-result'; +import { ValidateInstruction } from './validate-instruction'; +/** + * The result of a call to the validation controller's validate method. + */ +export interface ControllerValidateResult { + /** + * Whether validation passed. + */ + valid: boolean; + /** + * The validation result of every rule that was evaluated. + */ + results: ValidateResult[]; + /** + * The instruction passed to the controller's validate method. + */ + instruction?: ValidateInstruction; +} diff --git a/dist/native-modules/controller-validate-result.js b/dist/native-modules/controller-validate-result.js new file mode 100644 index 00000000..e69de29b diff --git a/dist/native-modules/implementation/rule.d.ts b/dist/native-modules/implementation/rule.d.ts new file mode 100644 index 00000000..8bba9d76 --- /dev/null +++ b/dist/native-modules/implementation/rule.d.ts @@ -0,0 +1,29 @@ +import { Expression } from 'aurelia-binding'; +/** + * Information related to a property that is the subject of validation. + */ +export interface RuleProperty { + /** + * The property name. null indicates the rule targets the object itself. + */ + name: string | null; + /** + * The displayName of the property (or object). + */ + displayName: string | null; +} +/** + * A rule definition. Associations a rule with a property or object. + */ +export interface Rule { + property: RuleProperty; + condition: (value: TValue, object?: TObject) => boolean | Promise; + config: Object; + when: { + (object: TObject): boolean; + } | null; + messageKey: string; + message: Expression | null; + sequence: number; + tag?: string; +} diff --git a/dist/native-modules/implementation/rule.js b/dist/native-modules/implementation/rule.js new file mode 100644 index 00000000..e69de29b diff --git a/dist/native-modules/implementation/rules.d.ts b/dist/native-modules/implementation/rules.d.ts new file mode 100644 index 00000000..30947f6f --- /dev/null +++ b/dist/native-modules/implementation/rules.d.ts @@ -0,0 +1,22 @@ +import { Rule } from './rule'; +/** + * Sets, unsets and retrieves rules on an object or constructor function. + */ +export declare class Rules { + /** + * The name of the property that stores the rules. + */ + private static key; + /** + * Applies the rules to a target. + */ + static set(target: any, rules: Rule[][]): void; + /** + * Removes rules from a target. + */ + static unset(target: any): void; + /** + * Retrieves the target's rules. + */ + static get(target: any): Rule[][] | null; +} diff --git a/dist/native-modules/implementation/rules.js b/dist/native-modules/implementation/rules.js new file mode 100644 index 00000000..3ac2caaa --- /dev/null +++ b/dist/native-modules/implementation/rules.js @@ -0,0 +1,37 @@ +/** + * Sets, unsets and retrieves rules on an object or constructor function. + */ +var Rules = (function () { + function Rules() { + } + /** + * Applies the rules to a target. + */ + Rules.set = function (target, rules) { + if (target instanceof Function) { + target = target.prototype; + } + Object.defineProperty(target, Rules.key, { enumerable: false, configurable: false, writable: true, value: rules }); + }; + /** + * Removes rules from a target. + */ + Rules.unset = function (target) { + if (target instanceof Function) { + target = target.prototype; + } + target[Rules.key] = null; + }; + /** + * Retrieves the target's rules. + */ + Rules.get = function (target) { + return target[Rules.key] || null; + }; + return Rules; +}()); +export { Rules }; +/** + * The name of the property that stores the rules. + */ +Rules.key = '__rules__'; diff --git a/dist/native-modules/implementation/standard-validator.d.ts b/dist/native-modules/implementation/standard-validator.d.ts new file mode 100644 index 00000000..4d8054ef --- /dev/null +++ b/dist/native-modules/implementation/standard-validator.d.ts @@ -0,0 +1,40 @@ +import { ViewResources } from 'aurelia-templating'; +import { Validator } from '../validator'; +import { ValidateResult } from '../validate-result'; +import { Rule } from './rule'; +import { ValidationMessageProvider } from './validation-messages'; +/** + * Validates. + * Responsible for validating objects and properties. + */ +export declare class StandardValidator extends Validator { + static inject: (typeof ViewResources | typeof ValidationMessageProvider)[]; + private messageProvider; + private lookupFunctions; + private getDisplayName; + constructor(messageProvider: ValidationMessageProvider, resources: ViewResources); + /** + * 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: any, propertyName: string, rules?: any): Promise; + /** + * 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: 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, results); + private validate(object, propertyName, rules); +} diff --git a/dist/native-modules/implementation/standard-validator.js b/dist/native-modules/implementation/standard-validator.js new file mode 100644 index 00000000..e27592d6 --- /dev/null +++ b/dist/native-modules/implementation/standard-validator.js @@ -0,0 +1,131 @@ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +import { ViewResources } from 'aurelia-templating'; +import { Validator } from '../validator'; +import { ValidateResult } from '../validate-result'; +import { Rules } from './rules'; +import { ValidationMessageProvider } from './validation-messages'; +/** + * Validates. + * Responsible for validating objects and properties. + */ +var StandardValidator = (function (_super) { + __extends(StandardValidator, _super); + function StandardValidator(messageProvider, resources) { + var _this = _super.call(this) || this; + _this.messageProvider = messageProvider; + _this.lookupFunctions = resources.lookupFunctions; + _this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider); + return _this; + } + /** + * 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; + if (propertyName !== null) { + displayName = this.messageProvider.getDisplayName(propertyName, displayName); + } + var overrideContext = { + $displayName: displayName, + $propertyName: propertyName, + $value: value, + $object: object, + $config: rule.config, + $getDisplayName: this.getDisplayName + }; + return expression.evaluate({ bindingContext: object, overrideContext: overrideContext }, this.lookupFunctions); + }; + StandardValidator.prototype.validateRuleSequence = function (object, propertyName, ruleSequence, sequence, results) { + var _this = this; + // are we validating all properties or a single property? + var validateAllProperties = propertyName === null || propertyName === undefined; + var rules = ruleSequence[sequence]; + var allValid = true; + // validate each rule. + var promises = []; + var _loop_1 = function (i) { + var rule = rules[i]; + // is the rule related to the property we're validating. + if (!validateAllProperties && rule.property.name !== propertyName) { + return "continue"; + } + // is this a conditional rule? is the condition met? + if (rule.when && !rule.when(object)) { + return "continue"; + } + // validate. + var value = rule.property.name === null ? object : object[rule.property.name]; + var promiseOrBoolean = rule.condition(value, object); + if (!(promiseOrBoolean instanceof Promise)) { + promiseOrBoolean = Promise.resolve(promiseOrBoolean); + } + promises.push(promiseOrBoolean.then(function (valid) { + var message = valid ? null : _this.getMessage(rule, object, value); + results.push(new ValidateResult(rule, object, rule.property.name, valid, message)); + allValid = allValid && valid; + return valid; + })); + }; + for (var i = 0; i < rules.length; i++) { + _loop_1(i); + } + return Promise.all(promises) + .then(function () { + sequence++; + if (allValid && sequence < ruleSequence.length) { + return _this.validateRuleSequence(object, propertyName, ruleSequence, sequence, results); + } + return results; + }); + }; + StandardValidator.prototype.validate = function (object, propertyName, rules) { + // rules specified? + if (!rules) { + // no. attempt to locate the rules. + rules = Rules.get(object); + } + // any rules? + if (!rules) { + return Promise.resolve([]); + } + return this.validateRuleSequence(object, propertyName, rules, 0, []); + }; + return StandardValidator; +}(Validator)); +export { StandardValidator }; +StandardValidator.inject = [ValidationMessageProvider, ViewResources]; diff --git a/dist/native-modules/implementation/util.d.ts b/dist/native-modules/implementation/util.d.ts new file mode 100644 index 00000000..1193b71f --- /dev/null +++ b/dist/native-modules/implementation/util.d.ts @@ -0,0 +1 @@ +export declare function isString(value: any): boolean; diff --git a/dist/native-modules/implementation/util.js b/dist/native-modules/implementation/util.js new file mode 100644 index 00000000..29e055d5 --- /dev/null +++ b/dist/native-modules/implementation/util.js @@ -0,0 +1,3 @@ +export function isString(value) { + return Object.prototype.toString.call(value) === '[object String]'; +} diff --git a/dist/native-modules/implementation/validation-messages.d.ts b/dist/native-modules/implementation/validation-messages.d.ts new file mode 100644 index 00000000..7a0978d7 --- /dev/null +++ b/dist/native-modules/implementation/validation-messages.d.ts @@ -0,0 +1,29 @@ +import { Expression } from 'aurelia-binding'; +import { ValidationParser } from './validation-parser'; +export interface ValidationMessages { + [key: string]: string; +} +/** + * Dictionary of validation messages. [messageKey]: messageExpression + */ +export declare const validationMessages: ValidationMessages; +/** + * Retrieves validation messages and property display names. + */ +export declare class ValidationMessageProvider { + private parser; + static inject: typeof ValidationParser[]; + constructor(parser: ValidationParser); + /** + * Returns a message binding expression that corresponds to the key. + * @param key The message key. + */ + getMessage(key: string): Expression; + /** + * Formulates a property display name using the property name and the configured + * displayName (if provided). + * Override this with your own custom logic. + * @param propertyName The property name. + */ + getDisplayName(propertyName: string, displayName: string | null | undefined): string; +} diff --git a/dist/native-modules/implementation/validation-messages.js b/dist/native-modules/implementation/validation-messages.js new file mode 100644 index 00000000..c1c31601 --- /dev/null +++ b/dist/native-modules/implementation/validation-messages.js @@ -0,0 +1,58 @@ +import { ValidationParser } from './validation-parser'; +/** + * Dictionary of validation messages. [messageKey]: messageExpression + */ +export var validationMessages = { + /** + * The default validation message. Used with rules that have no standard message. + */ + default: "${$displayName} is invalid.", + required: "${$displayName} is required.", + matches: "${$displayName} is not correctly formatted.", + email: "${$displayName} is not a valid email.", + minLength: "${$displayName} must be at least ${$config.length} character${$config.length === 1 ? '' : 's'}.", + maxLength: "${$displayName} cannot be longer than ${$config.length} character${$config.length === 1 ? '' : 's'}.", + minItems: "${$displayName} must contain at least ${$config.count} item${$config.count === 1 ? '' : 's'}.", + maxItems: "${$displayName} cannot contain more than ${$config.count} item${$config.count === 1 ? '' : 's'}.", + equals: "${$displayName} must be ${$config.expectedValue}.", +}; +/** + * Retrieves validation messages and property display names. + */ +var ValidationMessageProvider = (function () { + function ValidationMessageProvider(parser) { + this.parser = parser; + } + /** + * Returns a message binding expression that corresponds to the key. + * @param key The message key. + */ + ValidationMessageProvider.prototype.getMessage = function (key) { + var message; + if (key in validationMessages) { + message = validationMessages[key]; + } + else { + message = validationMessages['default']; + } + return this.parser.parseMessage(message); + }; + /** + * Formulates a property display name using the property name and the configured + * displayName (if provided). + * Override this with your own custom logic. + * @param propertyName The property name. + */ + ValidationMessageProvider.prototype.getDisplayName = function (propertyName, displayName) { + if (displayName !== null && displayName !== undefined) { + return displayName; + } + // split on upper-case letters. + var words = propertyName.split(/(?=[A-Z])/).join(' '); + // capitalize first letter. + return words.charAt(0).toUpperCase() + words.slice(1); + }; + return ValidationMessageProvider; +}()); +export { ValidationMessageProvider }; +ValidationMessageProvider.inject = [ValidationParser]; diff --git a/dist/native-modules/implementation/validation-parser.d.ts b/dist/native-modules/implementation/validation-parser.d.ts new file mode 100644 index 00000000..75b2c7af --- /dev/null +++ b/dist/native-modules/implementation/validation-parser.d.ts @@ -0,0 +1,26 @@ +import { Parser, Expression, AccessScope, Unparser } from 'aurelia-binding'; +import { BindingLanguage } from 'aurelia-templating'; +import { RuleProperty } from './rule'; +export interface PropertyAccessor { + (object: TObject): TValue; +} +export declare class ValidationParser { + private parser; + private bindinqLanguage; + static inject: (typeof Parser | typeof BindingLanguage)[]; + private emptyStringExpression; + private nullExpression; + private undefinedExpression; + private cache; + constructor(parser: Parser, bindinqLanguage: BindingLanguage); + parseMessage(message: string): Expression; + parseProperty(property: string | PropertyAccessor): RuleProperty; + private coalesce(part); + private getAccessorExpression(fn); +} +export declare class MessageExpressionValidator extends Unparser { + private originalMessage; + static validate(expression: Expression, originalMessage: string): void; + constructor(originalMessage: string); + visitAccessScope(access: AccessScope): void; +} diff --git a/dist/native-modules/implementation/validation-parser.js b/dist/native-modules/implementation/validation-parser.js new file mode 100644 index 00000000..ca1024aa --- /dev/null +++ b/dist/native-modules/implementation/validation-parser.js @@ -0,0 +1,88 @@ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +import { Parser, AccessMember, AccessScope, LiteralString, Binary, Conditional, LiteralPrimitive, CallMember, Unparser } from 'aurelia-binding'; +import { BindingLanguage } from 'aurelia-templating'; +import { isString } from './util'; +import * as LogManager from 'aurelia-logging'; +var ValidationParser = (function () { + function ValidationParser(parser, bindinqLanguage) { + this.parser = parser; + this.bindinqLanguage = bindinqLanguage; + this.emptyStringExpression = new LiteralString(''); + this.nullExpression = new LiteralPrimitive(null); + this.undefinedExpression = new LiteralPrimitive(undefined); + this.cache = {}; + } + ValidationParser.prototype.parseMessage = function (message) { + if (this.cache[message] !== undefined) { + return this.cache[message]; + } + var parts = this.bindinqLanguage.parseInterpolation(null, message); + if (parts === null) { + return new LiteralString(message); + } + var expression = new LiteralString(parts[0]); + for (var i = 1; i < parts.length; i += 2) { + expression = new Binary('+', expression, new Binary('+', this.coalesce(parts[i]), new LiteralString(parts[i + 1]))); + } + MessageExpressionValidator.validate(expression, message); + this.cache[message] = expression; + return expression; + }; + ValidationParser.prototype.parseProperty = function (property) { + if (isString(property)) { + return { name: property, displayName: null }; + } + var accessor = this.getAccessorExpression(property.toString()); + if (accessor instanceof AccessScope + || accessor instanceof AccessMember && accessor.object instanceof AccessScope) { + return { + name: accessor.name, + displayName: null + }; + } + 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]); + }; + return ValidationParser; +}()); +export { ValidationParser }; +ValidationParser.inject = [Parser, BindingLanguage]; +var MessageExpressionValidator = (function (_super) { + __extends(MessageExpressionValidator, _super); + function MessageExpressionValidator(originalMessage) { + var _this = _super.call(this, []) || this; + _this.originalMessage = originalMessage; + return _this; + } + MessageExpressionValidator.validate = function (expression, originalMessage) { + var visitor = new MessageExpressionValidator(originalMessage); + expression.accept(visitor); + }; + MessageExpressionValidator.prototype.visitAccessScope = function (access) { + if (access.ancestor !== 0) { + throw new Error('$parent is not permitted in validation message expressions.'); + } + if (['displayName', 'propertyName', 'value', 'object', 'config', 'getDisplayName'].indexOf(access.name) !== -1) { + LogManager.getLogger('aurelia-validation') + .warn("Did you mean to use \"$" + access.name + "\" instead of \"" + access.name + "\" in this validation message template: \"" + this.originalMessage + "\"?"); + } + }; + return MessageExpressionValidator; +}(Unparser)); +export { MessageExpressionValidator }; diff --git a/dist/native-modules/implementation/validation-rules.d.ts b/dist/native-modules/implementation/validation-rules.d.ts new file mode 100644 index 00000000..13251d4d --- /dev/null +++ b/dist/native-modules/implementation/validation-rules.d.ts @@ -0,0 +1,257 @@ +import { Rule, RuleProperty } from './rule'; +import { ValidationParser, PropertyAccessor } from './validation-parser'; +/** + * Part of the fluent rule API. Enables customizing property rules. + */ +export declare class FluentRuleCustomizer { + private fluentEnsure; + private fluentRules; + private parser; + private rule; + constructor(property: RuleProperty, condition: (value: TValue, object?: TObject) => boolean | Promise, config: Object, fluentEnsure: FluentEnsure, fluentRules: FluentRules, parser: ValidationParser); + /** + * Validate subsequent rules after previously declared rules have + * been validated successfully. Use to postpone validation of costly + * rules until less expensive rules pass validation. + */ + then(): this; + /** + * Specifies the key to use when looking up the rule's validation message. + */ + withMessageKey(key: string): this; + /** + * Specifies rule's validation message. + */ + withMessage(message: string): this; + /** + * Specifies a condition that must be met before attempting to validate the rule. + * @param condition A function that accepts the object as a parameter and returns true + * or false whether the rule should be evaluated. + */ + when(condition: (object: TObject) => boolean): this; + /** + * Tags the rule instance, enabling the rule to be found easily + * using ValidationRules.taggedRules(rules, tag) + */ + tag(tag: string): this; + /** + * Target a property with validation rules. + * @param property The property to target. Can be the property name or a property accessor function. + */ + ensure(subject: string | { + (model: TObject): TValue2; + }): FluentRules; + /** + * Targets an object with validation rules. + */ + ensureObject(): FluentRules; + /** + * Rules that have been defined using the fluent API. + */ + readonly rules: Rule[][]; + /** + * Applies the rules to a class or object, making them discoverable by the StandardValidator. + * @param target A class or object. + */ + on(target: any): FluentEnsure; + /** + * Applies an ad-hoc rule function to the ensured property or object. + * @param condition The function to validate the rule. + * Will be called with two arguments, the property value and the object. + * Should return a boolean or a Promise that resolves to a boolean. + */ + satisfies(condition: (value: TValue, object?: TObject) => boolean | Promise, config?: Object): FluentRuleCustomizer; + /** + * Applies a rule by name. + * @param name The name of the custom or standard rule. + * @param args The rule's arguments. + */ + satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer; + /** + * Applies the "required" rule to the property. + * The value cannot be null, undefined or whitespace. + */ + required(): FluentRuleCustomizer; + /** + * Applies the "matches" rule to the property. + * Value must match the specified regular expression. + * null, undefined and empty-string values are considered valid. + */ + matches(regex: RegExp): FluentRuleCustomizer; + /** + * Applies the "email" rule to the property. + * null, undefined and empty-string values are considered valid. + */ + email(): FluentRuleCustomizer; + /** + * Applies the "minLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + minLength(length: number): FluentRuleCustomizer; + /** + * Applies the "maxLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + maxLength(length: number): FluentRuleCustomizer; + /** + * Applies the "minItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + minItems(count: number): FluentRuleCustomizer; + /** + * Applies the "maxItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + maxItems(count: number): FluentRuleCustomizer; + /** + * Applies the "equals" validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + equals(expectedValue: TValue): FluentRuleCustomizer; +} +/** + * Part of the fluent rule API. Enables applying rules to properties and objects. + */ +export declare class FluentRules { + private fluentEnsure; + private parser; + private property; + static customRules: { + [name: string]: { + condition: (value: any, object?: any, ...fluentArgs: any[]) => boolean | Promise; + argsToConfig?: (...args: any[]) => any; + }; + }; + /** + * Current rule sequence number. Used to postpone evaluation of rules until rules + * with lower sequence number have successfully validated. The "then" fluent API method + * manages this property, there's usually no need to set it directly. + */ + sequence: number; + constructor(fluentEnsure: FluentEnsure, parser: ValidationParser, property: RuleProperty); + /** + * Sets the display name of the ensured property. + */ + displayName(name: string): this; + /** + * Applies an ad-hoc rule function to the ensured property or object. + * @param condition The function to validate the rule. + * Will be called with two arguments, the property value and the object. + * Should return a boolean or a Promise that resolves to a boolean. + */ + satisfies(condition: (value: TValue, object?: TObject) => boolean | Promise, config?: Object): FluentRuleCustomizer; + /** + * Applies a rule by name. + * @param name The name of the custom or standard rule. + * @param args The rule's arguments. + */ + satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer; + /** + * Applies the "required" rule to the property. + * The value cannot be null, undefined or whitespace. + */ + required(): FluentRuleCustomizer; + /** + * Applies the "matches" rule to the property. + * Value must match the specified regular expression. + * null, undefined and empty-string values are considered valid. + */ + matches(regex: RegExp): FluentRuleCustomizer; + /** + * Applies the "email" rule to the property. + * null, undefined and empty-string values are considered valid. + */ + email(): FluentRuleCustomizer; + /** + * Applies the "minLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + minLength(length: number): FluentRuleCustomizer; + /** + * Applies the "maxLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + maxLength(length: number): FluentRuleCustomizer; + /** + * Applies the "minItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + minItems(count: number): FluentRuleCustomizer; + /** + * Applies the "maxItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + maxItems(count: number): FluentRuleCustomizer; + /** + * Applies the "equals" validation rule to the property. + * null and undefined values are considered valid. + */ + equals(expectedValue: TValue): FluentRuleCustomizer; +} +/** + * Part of the fluent rule API. Enables targeting properties and objects with rules. + */ +export declare class FluentEnsure { + private parser; + /** + * Rules that have been defined using the fluent API. + */ + rules: Rule[][]; + 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. + */ + ensure(property: string | PropertyAccessor): FluentRules; + /** + * Targets an object with validation rules. + */ + ensureObject(): FluentRules; + /** + * Applies the rules to a class or object, making them discoverable by the StandardValidator. + * @param target A class or object. + */ + on(target: any): this; + /** + * Adds a rule definition to the sequenced ruleset. + */ + _addRule(rule: Rule): void; + private assertInitialized(); +} +/** + * Fluent rule definition API. + */ +export declare class ValidationRules { + private static parser; + static initialize(parser: ValidationParser): void; + /** + * Target a property with validation rules. + * @param property The property to target. Can be the property name or a property accessor function. + */ + static ensure(property: string | PropertyAccessor): FluentRules; + /** + * Targets an object with validation rules. + */ + static ensureObject(): FluentRules; + /** + * Defines a custom rule. + * @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. + */ + static customRule(name: string, condition: (value: any, object?: any, ...args: any[]) => boolean | Promise, message: string, argsToConfig?: (...args: any[]) => any): void; + /** + * Returns rules with the matching tag. + * @param rules The rules to search. + * @param tag The tag to search for. + */ + static taggedRules(rules: Rule[][], tag: string): Rule[][]; + /** + * Removes the rules from a class or object. + * @param target A class or object. + */ + static off(target: any): void; +} diff --git a/dist/native-modules/implementation/validation-rules.js b/dist/native-modules/implementation/validation-rules.js new file mode 100644 index 00000000..3882f661 --- /dev/null +++ b/dist/native-modules/implementation/validation-rules.js @@ -0,0 +1,416 @@ +import { isString } from './util'; +import { Rules } from './rules'; +import { validationMessages } from './validation-messages'; +/** + * Part of the fluent rule API. Enables customizing property rules. + */ +var FluentRuleCustomizer = (function () { + function FluentRuleCustomizer(property, condition, config, fluentEnsure, fluentRules, parser) { + if (config === void 0) { config = {}; } + this.fluentEnsure = fluentEnsure; + this.fluentRules = fluentRules; + this.parser = parser; + this.rule = { + property: property, + condition: condition, + config: config, + when: null, + messageKey: 'default', + message: null, + sequence: fluentRules.sequence + }; + this.fluentEnsure._addRule(this.rule); + } + /** + * Validate subsequent rules after previously declared rules have + * been validated successfully. Use to postpone validation of costly + * rules until less expensive rules pass validation. + */ + FluentRuleCustomizer.prototype.then = function () { + this.fluentRules.sequence++; + return this; + }; + /** + * Specifies the key to use when looking up the rule's validation message. + */ + FluentRuleCustomizer.prototype.withMessageKey = function (key) { + this.rule.messageKey = key; + this.rule.message = null; + return this; + }; + /** + * Specifies rule's validation message. + */ + FluentRuleCustomizer.prototype.withMessage = function (message) { + this.rule.messageKey = 'custom'; + this.rule.message = this.parser.parseMessage(message); + return this; + }; + /** + * Specifies a condition that must be met before attempting to validate the rule. + * @param condition A function that accepts the object as a parameter and returns true + * or false whether the rule should be evaluated. + */ + FluentRuleCustomizer.prototype.when = function (condition) { + this.rule.when = condition; + return this; + }; + /** + * Tags the rule instance, enabling the rule to be found easily + * using ValidationRules.taggedRules(rules, tag) + */ + FluentRuleCustomizer.prototype.tag = function (tag) { + this.rule.tag = tag; + return this; + }; + ///// FluentEnsure APIs ///// + /** + * Target a property with validation rules. + * @param property The property to target. Can be the property name or a property accessor function. + */ + FluentRuleCustomizer.prototype.ensure = function (subject) { + return this.fluentEnsure.ensure(subject); + }; + /** + * Targets an object with validation rules. + */ + FluentRuleCustomizer.prototype.ensureObject = function () { + return this.fluentEnsure.ensureObject(); + }; + Object.defineProperty(FluentRuleCustomizer.prototype, "rules", { + /** + * Rules that have been defined using the fluent API. + */ + get: function () { + return this.fluentEnsure.rules; + }, + enumerable: true, + configurable: true + }); + /** + * Applies the rules to a class or object, making them discoverable by the StandardValidator. + * @param target A class or object. + */ + FluentRuleCustomizer.prototype.on = function (target) { + return this.fluentEnsure.on(target); + }; + ///////// FluentRules APIs ///////// + /** + * Applies an ad-hoc rule function to the ensured property or object. + * @param condition The function to validate the rule. + * Will be called with two arguments, the property value and the object. + * Should return a boolean or a Promise that resolves to a boolean. + */ + FluentRuleCustomizer.prototype.satisfies = function (condition, config) { + return this.fluentRules.satisfies(condition, config); + }; + /** + * Applies a rule by name. + * @param name The name of the custom or standard rule. + * @param args The rule's arguments. + */ + FluentRuleCustomizer.prototype.satisfiesRule = function (name) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + return (_a = this.fluentRules).satisfiesRule.apply(_a, [name].concat(args)); + var _a; + }; + /** + * Applies the "required" rule to the property. + * The value cannot be null, undefined or whitespace. + */ + FluentRuleCustomizer.prototype.required = function () { + return this.fluentRules.required(); + }; + /** + * Applies the "matches" rule to the property. + * Value must match the specified regular expression. + * null, undefined and empty-string values are considered valid. + */ + FluentRuleCustomizer.prototype.matches = function (regex) { + return this.fluentRules.matches(regex); + }; + /** + * Applies the "email" rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRuleCustomizer.prototype.email = function () { + return this.fluentRules.email(); + }; + /** + * Applies the "minLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRuleCustomizer.prototype.minLength = function (length) { + return this.fluentRules.minLength(length); + }; + /** + * Applies the "maxLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRuleCustomizer.prototype.maxLength = function (length) { + return this.fluentRules.maxLength(length); + }; + /** + * Applies the "minItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + FluentRuleCustomizer.prototype.minItems = function (count) { + return this.fluentRules.minItems(count); + }; + /** + * Applies the "maxItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + FluentRuleCustomizer.prototype.maxItems = function (count) { + return this.fluentRules.maxItems(count); + }; + /** + * Applies the "equals" validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRuleCustomizer.prototype.equals = function (expectedValue) { + return this.fluentRules.equals(expectedValue); + }; + return FluentRuleCustomizer; +}()); +export { FluentRuleCustomizer }; +/** + * Part of the fluent rule API. Enables applying rules to properties and objects. + */ +var FluentRules = (function () { + function FluentRules(fluentEnsure, parser, property) { + this.fluentEnsure = fluentEnsure; + this.parser = parser; + this.property = property; + /** + * Current rule sequence number. Used to postpone evaluation of rules until rules + * with lower sequence number have successfully validated. The "then" fluent API method + * manages this property, there's usually no need to set it directly. + */ + this.sequence = 0; + } + /** + * Sets the display name of the ensured property. + */ + FluentRules.prototype.displayName = function (name) { + this.property.displayName = name; + return this; + }; + /** + * Applies an ad-hoc rule function to the ensured property or object. + * @param condition The function to validate the rule. + * Will be called with two arguments, the property value and the object. + * Should return a boolean or a Promise that resolves to a boolean. + */ + FluentRules.prototype.satisfies = function (condition, config) { + return new FluentRuleCustomizer(this.property, condition, config, this.fluentEnsure, this, this.parser); + }; + /** + * Applies a rule by name. + * @param name The name of the custom or standard rule. + * @param args The rule's arguments. + */ + FluentRules.prototype.satisfiesRule = function (name) { + var _this = this; + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var rule = FluentRules.customRules[name]; + if (!rule) { + // standard rule? + rule = this[name]; + if (rule instanceof Function) { + return rule.call.apply(rule, [this].concat(args)); + } + throw new Error("Rule with name \"" + name + "\" does not exist."); + } + var config = rule.argsToConfig ? rule.argsToConfig.apply(rule, args) : undefined; + return this.satisfies(function (value, obj) { + return (_a = rule.condition).call.apply(_a, [_this, value, obj].concat(args)); + var _a; + }, config) + .withMessageKey(name); + }; + /** + * Applies the "required" rule to the property. + * The value cannot be null, undefined or whitespace. + */ + FluentRules.prototype.required = function () { + return this.satisfies(function (value) { + return value !== null + && value !== undefined + && !(isString(value) && !/\S/.test(value)); + }).withMessageKey('required'); + }; + /** + * Applies the "matches" rule to the property. + * Value must match the specified regular expression. + * null, undefined and empty-string values are considered valid. + */ + FluentRules.prototype.matches = function (regex) { + return this.satisfies(function (value) { return value === null || value === undefined || value.length === 0 || regex.test(value); }) + .withMessageKey('matches'); + }; + /** + * Applies the "email" rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRules.prototype.email = function () { + // 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'); + }; + /** + * Applies the "minLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRules.prototype.minLength = function (length) { + return this.satisfies(function (value) { return value === null || value === undefined || value.length === 0 || value.length >= length; }, { length: length }) + .withMessageKey('minLength'); + }; + /** + * Applies the "maxLength" STRING validation rule to the property. + * null, undefined and empty-string values are considered valid. + */ + FluentRules.prototype.maxLength = function (length) { + return this.satisfies(function (value) { return value === null || value === undefined || value.length === 0 || value.length <= length; }, { length: length }) + .withMessageKey('maxLength'); + }; + /** + * Applies the "minItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + FluentRules.prototype.minItems = function (count) { + return this.satisfies(function (value) { return value === null || value === undefined || value.length >= count; }, { count: count }) + .withMessageKey('minItems'); + }; + /** + * Applies the "maxItems" ARRAY validation rule to the property. + * null and undefined values are considered valid. + */ + FluentRules.prototype.maxItems = function (count) { + return this.satisfies(function (value) { return value === null || value === undefined || value.length <= count; }, { count: count }) + .withMessageKey('maxItems'); + }; + /** + * Applies the "equals" validation rule to the property. + * null and undefined values are considered valid. + */ + FluentRules.prototype.equals = function (expectedValue) { + return this.satisfies(function (value) { return value === null || value === undefined || value === '' || value === expectedValue; }, { expectedValue: expectedValue }) + .withMessageKey('equals'); + }; + return FluentRules; +}()); +export { FluentRules }; +FluentRules.customRules = {}; +/** + * Part of the fluent rule API. Enables targeting properties and objects with rules. + */ +var FluentEnsure = (function () { + function FluentEnsure(parser) { + this.parser = parser; + /** + * Rules that have been defined using the fluent API. + */ + this.rules = []; + } + /** + * Target a property with validation rules. + * @param property The property to target. Can be the property name or a property accessor + * function. + */ + FluentEnsure.prototype.ensure = function (property) { + this.assertInitialized(); + return new FluentRules(this, this.parser, this.parser.parseProperty(property)); + }; + /** + * Targets an object with validation rules. + */ + FluentEnsure.prototype.ensureObject = function () { + this.assertInitialized(); + return new FluentRules(this, this.parser, { name: null, displayName: null }); + }; + /** + * Applies the rules to a class or object, making them discoverable by the StandardValidator. + * @param target A class or object. + */ + FluentEnsure.prototype.on = function (target) { + Rules.set(target, this.rules); + return this; + }; + /** + * Adds a rule definition to the sequenced ruleset. + */ + FluentEnsure.prototype._addRule = function (rule) { + while (this.rules.length < rule.sequence + 1) { + this.rules.push([]); + } + this.rules[rule.sequence].push(rule); + }; + FluentEnsure.prototype.assertInitialized = function () { + if (this.parser) { + return; + } + throw new Error("Did you forget to add \".plugin('aurelia-validation)\" to your main.js?"); + }; + return FluentEnsure; +}()); +export { FluentEnsure }; +/** + * Fluent rule definition API. + */ +var ValidationRules = (function () { + function ValidationRules() { + } + ValidationRules.initialize = function (parser) { + ValidationRules.parser = parser; + }; + /** + * Target a property with validation rules. + * @param property The property to target. Can be the property name or a property accessor function. + */ + ValidationRules.ensure = function (property) { + return new FluentEnsure(ValidationRules.parser).ensure(property); + }; + /** + * Targets an object with validation rules. + */ + ValidationRules.ensureObject = function () { + return new FluentEnsure(ValidationRules.parser).ensureObject(); + }; + /** + * Defines a custom rule. + * @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. + */ + ValidationRules.customRule = function (name, condition, message, argsToConfig) { + validationMessages[name] = message; + FluentRules.customRules[name] = { condition: condition, argsToConfig: argsToConfig }; + }; + /** + * Returns rules with the matching tag. + * @param rules The rules to search. + * @param tag The tag to search for. + */ + ValidationRules.taggedRules = function (rules, tag) { + return rules.map(function (x) { return x.filter(function (r) { return r.tag === tag; }); }); + }; + /** + * Removes the rules from a class or object. + * @param target A class or object. + */ + ValidationRules.off = function (target) { + Rules.unset(target); + }; + return ValidationRules; +}()); +export { ValidationRules }; diff --git a/dist/native-modules/property-info.d.ts b/dist/native-modules/property-info.d.ts new file mode 100644 index 00000000..59b760bf --- /dev/null +++ b/dist/native-modules/property-info.d.ts @@ -0,0 +1,10 @@ +import { Expression } from 'aurelia-binding'; +/** + * Retrieves the object and property name for the specified expression. + * @param expression The expression + * @param source The scope + */ +export declare function getPropertyInfo(expression: Expression, source: any): { + object: Object; + propertyName: string; +} | null; diff --git a/dist/native-modules/property-info.js b/dist/native-modules/property-info.js new file mode 100644 index 00000000..75edf715 --- /dev/null +++ b/dist/native-modules/property-info.js @@ -0,0 +1,42 @@ +import { AccessMember, AccessScope, AccessKeyed, BindingBehavior, ValueConverter } from 'aurelia-binding'; +function getObject(expression, objectExpression, source) { + var value = objectExpression.evaluate(source, null); + if (value === null || value === undefined || value instanceof Object) { + return value; + } + /* 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. + * @param expression The expression + * @param source The scope + */ +export function getPropertyInfo(expression, source) { + var originalExpression = expression; + while (expression instanceof BindingBehavior || expression instanceof ValueConverter) { + expression = expression.expression; + } + var object; + var propertyName; + if (expression instanceof AccessScope) { + object = source.bindingContext; + propertyName = expression.name; + } + else if (expression instanceof AccessMember) { + object = getObject(originalExpression, expression.object, source); + propertyName = expression.name; + } + else if (expression instanceof AccessKeyed) { + object = getObject(originalExpression, expression.object, source); + propertyName = expression.key.evaluate(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 new file mode 100644 index 00000000..09c18430 --- /dev/null +++ b/dist/native-modules/validate-binding-behavior-base.d.ts @@ -0,0 +1,19 @@ +import { TaskQueue } from 'aurelia-task-queue'; +import { ValidationController } from './validation-controller'; +/** + * Binding behavior. Indicates the bound property should be validated. + */ +export declare abstract class ValidateBindingBehaviorBase { + private taskQueue; + 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. + */ + 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 new file mode 100644 index 00000000..72af199f --- /dev/null +++ b/dist/native-modules/validate-binding-behavior-base.js @@ -0,0 +1,106 @@ +import { Optional } from 'aurelia-dependency-injection'; +import { DOM } from 'aurelia-pal'; +import { ValidationController } from './validation-controller'; +import { validateTrigger } from './validate-trigger'; +/** + * Binding behavior. Indicates the bound property should be validated. + */ +var ValidateBindingBehaviorBase = (function () { + function ValidateBindingBehaviorBase(taskQueue) { + 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. + */ + ValidateBindingBehaviorBase.prototype.getTarget = function (binding, view) { + var target = binding.target; + // DOM element + if (target instanceof Element) { + return target; + } + // custom element or custom attribute + for (var i = 0, ii = view.controllers.length; i < ii; i++) { + var controller = view.controllers[i]; + if (controller.viewModel === target) { + var element = controller.container.get(DOM.Element); + if (element) { + return element; + } + throw new Error("Unable to locate target element for \"" + binding.sourceExpression + "\"."); + } + } + throw new Error("Unable to locate target element for \"" + binding.sourceExpression + "\"."); + }; + ValidateBindingBehaviorBase.prototype.bind = function (binding, source, rulesOrController, rules) { + var _this = this; + // identify the target element. + var target = this.getTarget(binding, source); + // locate the controller. + var controller; + if (rulesOrController instanceof ValidationController) { + controller = rulesOrController; + } + else { + controller = source.container.get(Optional.of(ValidationController)); + rules = rulesOrController; + } + if (controller === null) { + throw new Error("A ValidationController has not been registered."); + } + 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); }); + }; + binding.validateTarget = target; + target.addEventListener('blur', binding.validateBlurHandler); + } + 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); + }; + } + }; + ValidateBindingBehaviorBase.prototype.unbind = function (binding) { + // reset the binding to it's original state. + if (binding.standardUpdateSource) { + binding.updateSource = binding.standardUpdateSource; + binding.standardUpdateSource = null; + } + if (binding.standardUpdateTarget) { + binding.updateTarget = binding.standardUpdateTarget; + binding.standardUpdateTarget = null; + } + if (binding.validateBlurHandler) { + binding.validateTarget.removeEventListener('blur', binding.validateBlurHandler); + binding.validateBlurHandler = null; + binding.validateTarget = null; + } + binding.validationController.unregisterBinding(binding); + binding.validationController = null; + }; + return ValidateBindingBehaviorBase; +}()); +export { ValidateBindingBehaviorBase }; diff --git a/dist/native-modules/validate-binding-behavior.d.ts b/dist/native-modules/validate-binding-behavior.d.ts new file mode 100644 index 00000000..2d55c7ec --- /dev/null +++ b/dist/native-modules/validate-binding-behavior.d.ts @@ -0,0 +1,47 @@ +import { TaskQueue } from 'aurelia-task-queue'; +import { ValidationController } from './validation-controller'; +import { ValidateBindingBehaviorBase } from './validate-binding-behavior-base'; +/** + * Binding behavior. Indicates the bound property should be validated + * when the validate trigger specified by the associated controller's + * validateTrigger property occurs. + */ +export declare class ValidateBindingBehavior extends ValidateBindingBehaviorBase { + static inject: typeof TaskQueue[]; + getValidateTrigger(controller: ValidationController): number; +} +/** + * Binding behavior. Indicates the bound property will be validated + * manually, by calling controller.validate(). No automatic validation + * triggered by data-entry or blur will occur. + */ +export declare class ValidateManuallyBindingBehavior extends ValidateBindingBehaviorBase { + static inject: typeof TaskQueue[]; + getValidateTrigger(): number; +} +/** + * Binding behavior. Indicates the bound property should be validated + * when the associated element blurs. + */ +export declare class ValidateOnBlurBindingBehavior extends ValidateBindingBehaviorBase { + static inject: typeof TaskQueue[]; + getValidateTrigger(): number; +} +/** + * Binding behavior. Indicates the bound property should be validated + * when the associated element is changed by the user, causing a change + * to the model. + */ +export declare class ValidateOnChangeBindingBehavior extends ValidateBindingBehaviorBase { + static inject: typeof TaskQueue[]; + getValidateTrigger(): number; +} +/** + * Binding behavior. Indicates the bound property should be validated + * when the associated element blurs or is changed by the user, causing + * a change to the model. + */ +export declare class ValidateOnChangeOrBlurBindingBehavior extends ValidateBindingBehaviorBase { + static inject: typeof TaskQueue[]; + getValidateTrigger(): number; +} diff --git a/dist/native-modules/validate-binding-behavior.js b/dist/native-modules/validate-binding-behavior.js new file mode 100644 index 00000000..0ecbd5a9 --- /dev/null +++ b/dist/native-modules/validate-binding-behavior.js @@ -0,0 +1,92 @@ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +import { TaskQueue } from 'aurelia-task-queue'; +import { validateTrigger } from './validate-trigger'; +import { ValidateBindingBehaviorBase } from './validate-binding-behavior-base'; +/** + * Binding behavior. Indicates the bound property should be validated + * when the validate trigger specified by the associated controller's + * validateTrigger property occurs. + */ +var ValidateBindingBehavior = (function (_super) { + __extends(ValidateBindingBehavior, _super); + function ValidateBindingBehavior() { + return _super.apply(this, arguments) || this; + } + ValidateBindingBehavior.prototype.getValidateTrigger = function (controller) { + return controller.validateTrigger; + }; + return ValidateBindingBehavior; +}(ValidateBindingBehaviorBase)); +export { ValidateBindingBehavior }; +ValidateBindingBehavior.inject = [TaskQueue]; +/** + * Binding behavior. Indicates the bound property will be validated + * manually, by calling controller.validate(). No automatic validation + * triggered by data-entry or blur will occur. + */ +var ValidateManuallyBindingBehavior = (function (_super) { + __extends(ValidateManuallyBindingBehavior, _super); + function ValidateManuallyBindingBehavior() { + return _super.apply(this, arguments) || this; + } + ValidateManuallyBindingBehavior.prototype.getValidateTrigger = function () { + return validateTrigger.manual; + }; + return ValidateManuallyBindingBehavior; +}(ValidateBindingBehaviorBase)); +export { ValidateManuallyBindingBehavior }; +ValidateManuallyBindingBehavior.inject = [TaskQueue]; +/** + * Binding behavior. Indicates the bound property should be validated + * when the associated element blurs. + */ +var ValidateOnBlurBindingBehavior = (function (_super) { + __extends(ValidateOnBlurBindingBehavior, _super); + function ValidateOnBlurBindingBehavior() { + return _super.apply(this, arguments) || this; + } + ValidateOnBlurBindingBehavior.prototype.getValidateTrigger = function () { + return validateTrigger.blur; + }; + return ValidateOnBlurBindingBehavior; +}(ValidateBindingBehaviorBase)); +export { ValidateOnBlurBindingBehavior }; +ValidateOnBlurBindingBehavior.inject = [TaskQueue]; +/** + * Binding behavior. Indicates the bound property should be validated + * when the associated element is changed by the user, causing a change + * to the model. + */ +var ValidateOnChangeBindingBehavior = (function (_super) { + __extends(ValidateOnChangeBindingBehavior, _super); + function ValidateOnChangeBindingBehavior() { + return _super.apply(this, arguments) || this; + } + ValidateOnChangeBindingBehavior.prototype.getValidateTrigger = function () { + return validateTrigger.change; + }; + return ValidateOnChangeBindingBehavior; +}(ValidateBindingBehaviorBase)); +export { ValidateOnChangeBindingBehavior }; +ValidateOnChangeBindingBehavior.inject = [TaskQueue]; +/** + * Binding behavior. Indicates the bound property should be validated + * when the associated element blurs or is changed by the user, causing + * a change to the model. + */ +var ValidateOnChangeOrBlurBindingBehavior = (function (_super) { + __extends(ValidateOnChangeOrBlurBindingBehavior, _super); + function ValidateOnChangeOrBlurBindingBehavior() { + return _super.apply(this, arguments) || this; + } + ValidateOnChangeOrBlurBindingBehavior.prototype.getValidateTrigger = function () { + return validateTrigger.changeOrBlur; + }; + return ValidateOnChangeOrBlurBindingBehavior; +}(ValidateBindingBehaviorBase)); +export { ValidateOnChangeOrBlurBindingBehavior }; +ValidateOnChangeOrBlurBindingBehavior.inject = [TaskQueue]; diff --git a/dist/native-modules/validate-instruction.d.ts b/dist/native-modules/validate-instruction.d.ts new file mode 100644 index 00000000..2f792a70 --- /dev/null +++ b/dist/native-modules/validate-instruction.d.ts @@ -0,0 +1,17 @@ +/** + * Instructions for the validation controller's validate method. + */ +export interface ValidateInstruction { + /** + * The object to validate. + */ + object: any; + /** + * The property to validate. Optional. + */ + propertyName?: any; + /** + * The rules to validate. Optional. + */ + rules?: any; +} diff --git a/dist/native-modules/validate-instruction.js b/dist/native-modules/validate-instruction.js new file mode 100644 index 00000000..e69de29b diff --git a/dist/native-modules/validate-result.d.ts b/dist/native-modules/validate-result.d.ts new file mode 100644 index 00000000..461c2318 --- /dev/null +++ b/dist/native-modules/validate-result.d.ts @@ -0,0 +1,23 @@ +/** + * The result of validating an individual validation rule. + */ +export declare class ValidateResult { + rule: any; + object: any; + propertyName: string | null; + valid: boolean; + message: string | null; + private static nextId; + /** + * A number that uniquely identifies the result instance. + */ + id: number; + /** + * @param rule The rule associated with the result. Validator implementation specific. + * @param object The object that was validated. + * @param propertyName The name of the property that was validated. + * @param error The error, if the result is a validation error. + */ + constructor(rule: any, object: any, propertyName: string | null, valid: boolean, message?: string | null); + toString(): string | null; +} diff --git a/dist/native-modules/validate-result.js b/dist/native-modules/validate-result.js new file mode 100644 index 00000000..7c21786e --- /dev/null +++ b/dist/native-modules/validate-result.js @@ -0,0 +1,26 @@ +/** + * The result of validating an individual validation rule. + */ +var ValidateResult = (function () { + /** + * @param rule The rule associated with the result. Validator implementation specific. + * @param object The object that was validated. + * @param propertyName The name of the property that was validated. + * @param error The error, if the result is a validation error. + */ + function ValidateResult(rule, object, propertyName, valid, message) { + if (message === void 0) { message = null; } + this.rule = rule; + this.object = object; + this.propertyName = propertyName; + this.valid = valid; + this.message = message; + this.id = ValidateResult.nextId++; + } + ValidateResult.prototype.toString = function () { + return this.valid ? 'Valid.' : this.message; + }; + return ValidateResult; +}()); +export { ValidateResult }; +ValidateResult.nextId = 0; diff --git a/dist/native-modules/validate-trigger.d.ts b/dist/native-modules/validate-trigger.d.ts new file mode 100644 index 00000000..82c60096 --- /dev/null +++ b/dist/native-modules/validate-trigger.d.ts @@ -0,0 +1,9 @@ +/** + * Validation triggers. + */ +export declare const validateTrigger: { + manual: number; + blur: number; + change: number; + changeOrBlur: number; +}; diff --git a/dist/native-modules/validate-trigger.js b/dist/native-modules/validate-trigger.js new file mode 100644 index 00000000..1ccec739 --- /dev/null +++ b/dist/native-modules/validate-trigger.js @@ -0,0 +1,25 @@ +/** + * Validation triggers. + */ +/** + * Validation triggers. + */ export var validateTrigger = { + /** + * 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. + */ + blur: 1, + /** + * 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 + * when it updates the model due to a change in the view. + */ + changeOrBlur: 3 +}; diff --git a/dist/native-modules/validation-controller-factory.d.ts b/dist/native-modules/validation-controller-factory.d.ts new file mode 100644 index 00000000..2c51999e --- /dev/null +++ b/dist/native-modules/validation-controller-factory.d.ts @@ -0,0 +1,20 @@ +import { Container } from 'aurelia-dependency-injection'; +import { ValidationController } from './validation-controller'; +import { Validator } from './validator'; +/** + * Creates ValidationController instances. + */ +export declare class ValidationControllerFactory { + private container; + static get(container: Container): ValidationControllerFactory; + constructor(container: Container); + /** + * Creates a new controller instance. + */ + create(validator?: Validator): ValidationController; + /** + * Creates a new controller and registers it in the current element's container so that it's + * available to the validate binding behavior and renderers. + */ + createForCurrentScope(validator?: Validator): ValidationController; +} diff --git a/dist/native-modules/validation-controller-factory.js b/dist/native-modules/validation-controller-factory.js new file mode 100644 index 00000000..5cb1c90b --- /dev/null +++ b/dist/native-modules/validation-controller-factory.js @@ -0,0 +1,34 @@ +import { ValidationController } from './validation-controller'; +import { Validator } from './validator'; +/** + * Creates ValidationController instances. + */ +var ValidationControllerFactory = (function () { + function ValidationControllerFactory(container) { + this.container = container; + } + ValidationControllerFactory.get = function (container) { + return new ValidationControllerFactory(container); + }; + /** + * Creates a new controller instance. + */ + ValidationControllerFactory.prototype.create = function (validator) { + if (!validator) { + validator = this.container.get(Validator); + } + return new ValidationController(validator); + }; + /** + * Creates a new controller and registers it in the current element's container so that it's + * available to the validate binding behavior and renderers. + */ + ValidationControllerFactory.prototype.createForCurrentScope = function (validator) { + var controller = this.create(validator); + this.container.registerInstance(ValidationController, controller); + return controller; + }; + return ValidationControllerFactory; +}()); +export { ValidationControllerFactory }; +ValidationControllerFactory['protocol:aurelia:resolver'] = true; diff --git a/dist/native-modules/validation-controller.d.ts b/dist/native-modules/validation-controller.d.ts new file mode 100644 index 00000000..d88935e5 --- /dev/null +++ b/dist/native-modules/validation-controller.d.ts @@ -0,0 +1,108 @@ +import { Binding } from 'aurelia-binding'; +import { Validator } from './validator'; +import { ValidationRenderer } from './validation-renderer'; +import { ValidateResult } from './validate-result'; +import { ValidateInstruction } from './validate-instruction'; +import { ControllerValidateResult } from './controller-validate-result'; +/** + * Orchestrates validation. + * Manages a set of bindings, renderers and objects. + * Exposes the current list of validation results for binding purposes. + */ +export declare class ValidationController { + private validator; + static inject: typeof Validator[]; + private bindings; + private renderers; + /** + * Validation results that have been rendered by the controller. + */ + private results; + /** + * Validation errors that have been rendered by the controller. + */ + errors: ValidateResult[]; + /** + * Whether the controller is currently validating. + */ + validating: boolean; + private elements; + private objects; + /** + * The trigger that will invoke automatic validation of a property used in a binding. + */ + validateTrigger: number; + private finishValidating; + constructor(validator: Validator); + /** + * Adds an object to the set of objects that should be validated when validate is called. + * @param object The object. + * @param rules Optional. The rules. If rules aren't supplied the Validator implementation will lookup the rules. + */ + addObject(object: any, rules?: any): void; + /** + * Removes an object from the set of objects that should be validated when validate is called. + * @param object The object. + */ + removeObject(object: any): void; + /** + * Adds and renders an error. + */ + addError(message: string, object: any, propertyName?: string | null): ValidateResult; + /** + * Removes and unrenders an error. + */ + removeError(result: ValidateResult): void; + /** + * Adds a renderer. + * @param renderer The renderer. + */ + addRenderer(renderer: ValidationRenderer): void; + /** + * Removes a renderer. + * @param renderer The renderer. + */ + removeRenderer(renderer: ValidationRenderer): void; + /** + * Registers a binding with the controller. + * @param binding The binding instance. + * @param target The DOM element. + * @param rules (optional) rules associated with the binding. Validator implementation specific. + */ + registerBinding(binding: Binding, target: Element, rules?: any): void; + /** + * Unregisters a binding with the controller. + * @param binding The binding instance. + */ + unregisterBinding(binding: Binding): void; + /** + * Interprets the instruction and returns a predicate that will identify + * relevant results in the list of rendered validation results. + */ + private getInstructionPredicate(instruction?); + /** + * Validates and renders results. + * @param instruction Optional. Instructions on what to validate. If undefined, all + * objects and bindings will be validated. + */ + validate(instruction?: ValidateInstruction): Promise; + /** + * Resets any rendered validation results (unrenders). + * @param instruction Optional. Instructions on what to reset. If unspecified all rendered results + * will be unrendered. + */ + reset(instruction?: ValidateInstruction): void; + /** + * Gets the elements associated with an object and propertyName (if any). + */ + private getAssociatedElements({object, propertyName}); + private processResultDelta(kind, oldResults, newResults); + /** + * Validates the property associated with a binding. + */ + validateBinding(binding: Binding): void; + /** + * Resets the results 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 new file mode 100644 index 00000000..d936e85e --- /dev/null +++ b/dist/native-modules/validation-controller.js @@ -0,0 +1,345 @@ +import { Validator } from './validator'; +import { validateTrigger } from './validate-trigger'; +import { getPropertyInfo } from './property-info'; +import { ValidateResult } from './validate-result'; +/** + * Orchestrates validation. + * Manages a set of bindings, renderers and objects. + * Exposes the current list of validation results for binding purposes. + */ +var ValidationController = (function () { + function ValidationController(validator) { + this.validator = validator; + // Registered bindings (via the validate binding behavior) + this.bindings = new Map(); + // Renderers that have been added to the controller instance. + this.renderers = []; + /** + * Validation results that have been rendered by the controller. + */ + this.results = []; + /** + * Validation errors that have been rendered by the controller. + */ + this.errors = []; + /** + * Whether the controller is currently validating. + */ + this.validating = false; + // Elements related to validation results that have been rendered. + this.elements = new Map(); + // Objects that have been added to the controller instance (entity-style validation). + this.objects = new Map(); + /** + * The trigger that will invoke automatic validation of a property used in a binding. + */ + this.validateTrigger = validateTrigger.blur; + // Promise that resolves when validation has completed. + this.finishValidating = Promise.resolve(); + } + /** + * Adds an object to the set of objects that should be validated when validate is called. + * @param object The object. + * @param rules Optional. The rules. If rules aren't supplied the Validator implementation will lookup the rules. + */ + ValidationController.prototype.addObject = function (object, rules) { + this.objects.set(object, rules); + }; + /** + * Removes an object from the set of objects that should be validated when validate is called. + * @param object The object. + */ + ValidationController.prototype.removeObject = function (object) { + this.objects.delete(object); + this.processResultDelta('reset', this.results.filter(function (result) { return result.object === object; }), []); + }; + /** + * Adds and renders an error. + */ + ValidationController.prototype.addError = function (message, object, propertyName) { + if (propertyName === void 0) { propertyName = null; } + var result = new ValidateResult({}, object, propertyName, false, message); + this.processResultDelta('validate', [], [result]); + return result; + }; + /** + * Removes and unrenders an error. + */ + ValidationController.prototype.removeError = function (result) { + if (this.results.indexOf(result) !== -1) { + this.processResultDelta('reset', [result], []); + } + }; + /** + * Adds a renderer. + * @param renderer The renderer. + */ + ValidationController.prototype.addRenderer = function (renderer) { + var _this = this; + this.renderers.push(renderer); + renderer.render({ + kind: 'validate', + render: this.results.map(function (result) { return ({ result: result, elements: _this.elements.get(result) }); }), + unrender: [] + }); + }; + /** + * Removes a renderer. + * @param renderer The renderer. + */ + ValidationController.prototype.removeRenderer = function (renderer) { + var _this = this; + this.renderers.splice(this.renderers.indexOf(renderer), 1); + renderer.render({ + kind: 'reset', + render: [], + unrender: this.results.map(function (result) { return ({ result: result, elements: _this.elements.get(result) }); }) + }); + }; + /** + * Registers a binding with the controller. + * @param binding The binding instance. + * @param target The DOM element. + * @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, propertyInfo: null }); + }; + /** + * Unregisters a binding with the controller. + * @param binding The binding instance. + */ + ValidationController.prototype.unregisterBinding = function (binding) { + this.resetBinding(binding); + this.bindings.delete(binding); + }; + /** + * Interprets the instruction and returns a predicate that will identify + * relevant results in the list of rendered validation results. + */ + 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; + if (instruction.propertyName) { + predicate_1 = function (x) { return x.object === object_1 && x.propertyName === propertyName_1; }; + } + else { + predicate_1 = function (x) { return x.object === object_1; }; + } + if (rules_1) { + return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); }; + } + return predicate_1; + } + else { + return function () { return true; }; + } + }; + /** + * Validates and renders results. + * @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; + // Get a function that will process the validation instruction. + var execute; + if (instruction) { + var object_2 = instruction.object, propertyName_2 = instruction.propertyName, rules_2 = instruction.rules; + // if rules were not specified, check the object map. + rules_2 = rules_2 || this.objects.get(object_2); + // property specified? + if (instruction.propertyName === undefined) { + // validate the specified object. + execute = function () { return _this.validator.validateObject(object_2, rules_2); }; + } + else { + // validate the specified property. + execute = function () { return _this.validator.validateProperty(object_2, propertyName_2, rules_2); }; + } + } + else { + // validate all objects and bindings. + execute = function () { + var promises = []; + for (var _i = 0, _a = Array.from(_this.objects); _i < _a.length; _i++) { + var _b = _a[_i], object = _b[0], rules = _b[1]; + promises.push(_this.validator.validateObject(object, rules)); + } + 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 propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (!propertyInfo || _this.objects.has(propertyInfo.object)) { + continue; + } + promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules)); + } + return Promise.all(promises).then(function (resultSets) { return resultSets.reduce(function (a, b) { return a.concat(b); }, []); }); + }; + } + // Wait for any existing validation to finish, execute the instruction, render the results. + this.validating = true; + var returnPromise = this.finishValidating + .then(execute) + .then(function (newResults) { + var predicate = _this.getInstructionPredicate(instruction); + var oldResults = _this.results.filter(predicate); + _this.processResultDelta('validate', oldResults, newResults); + if (returnPromise === _this.finishValidating) { + _this.validating = false; + } + var result = { + instruction: instruction, + valid: newResults.find(function (x) { return !x.valid; }) === undefined, + results: newResults + }; + return result; + }) + .catch(function (exception) { + // recover, to enable subsequent calls to validate() + _this.validating = false; + _this.finishValidating = Promise.resolve(); + return Promise.reject(exception); + }); + this.finishValidating = returnPromise; + return returnPromise; + }; + /** + * Resets any rendered validation results (unrenders). + * @param instruction Optional. Instructions on what to reset. If unspecified all rendered results + * will be unrendered. + */ + ValidationController.prototype.reset = function (instruction) { + var predicate = this.getInstructionPredicate(instruction); + var oldResults = this.results.filter(predicate); + this.processResultDelta('reset', oldResults, []); + }; + /** + * Gets the elements associated with an object and propertyName (if any). + */ + ValidationController.prototype.getAssociatedElements = function (_a) { + var object = _a.object, propertyName = _a.propertyName; + 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 propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) { + elements.push(target); + } + } + return elements; + }; + ValidationController.prototype.processResultDelta = function (kind, oldResults, newResults) { + // prepare the instruction. + var instruction = { + kind: kind, + render: [], + unrender: [] + }; + // create a shallow copy of newResults so we can mutate it without causing side-effects. + newResults = newResults.slice(0); + var _loop_1 = function (oldResult) { + // get the elements associated with the old result. + var elements = this_1.elements.get(oldResult); + // remove the old result from the element map. + this_1.elements.delete(oldResult); + // create the unrender instruction. + instruction.unrender.push({ result: oldResult, elements: elements }); + // determine if there's a corresponding new result for the old result we are unrendering. + var newResultIndex = newResults.findIndex(function (x) { return x.rule === oldResult.rule && x.object === oldResult.object && x.propertyName === oldResult.propertyName; }); + if (newResultIndex === -1) { + // no corresponding new result... simple remove. + this_1.results.splice(this_1.results.indexOf(oldResult), 1); + if (!oldResult.valid) { + this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); + } + } + else { + // there is a corresponding new result... + var newResult = newResults.splice(newResultIndex, 1)[0]; + // get the elements that are associated with the new result. + var elements_1 = this_1.getAssociatedElements(newResult); + this_1.elements.set(newResult, elements_1); + // create a render instruction for the new result. + instruction.render.push({ result: newResult, elements: elements_1 }); + // do an in-place replacement of the old result with the new result. + // this ensures any repeats bound to this.results will not thrash. + this_1.results.splice(this_1.results.indexOf(oldResult), 1, newResult); + if (!oldResult.valid && newResult.valid) { + this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); + } + else if (!oldResult.valid && !newResult.valid) { + this_1.errors.splice(this_1.errors.indexOf(oldResult), 1, newResult); + } + else if (!newResult.valid) { + this_1.errors.push(newResult); + } + } + }; + var this_1 = this; + // create unrender instructions from the old results. + for (var _i = 0, oldResults_1 = oldResults; _i < oldResults_1.length; _i++) { + var oldResult = oldResults_1[_i]; + _loop_1(oldResult); + } + // create render instructions from the remaining new results. + for (var _a = 0, newResults_1 = newResults; _a < newResults_1.length; _a++) { + var result = newResults_1[_a]; + var elements = this.getAssociatedElements(result); + instruction.render.push({ result: result, elements: elements }); + this.elements.set(result, elements); + this.results.push(result); + if (!result.valid) { + this.errors.push(result); + } + } + // render. + for (var _b = 0, _c = this.renderers; _b < _c.length; _b++) { + var renderer = _c[_b]; + renderer.render(instruction); + } + }; + /** + * Validates the property associated with a binding. + */ + ValidationController.prototype.validateBinding = function (binding) { + if (!binding.isBound) { + return; + } + var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source); + var rules = undefined; + var registeredBinding = this.bindings.get(binding); + 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 results for a property associated with a binding. + */ + ValidationController.prototype.resetBinding = function (binding) { + 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 }); + }; + return ValidationController; +}()); +export { ValidationController }; +ValidationController.inject = [Validator]; diff --git a/dist/native-modules/validation-errors-custom-attribute.d.ts b/dist/native-modules/validation-errors-custom-attribute.d.ts new file mode 100644 index 00000000..73340e73 --- /dev/null +++ b/dist/native-modules/validation-errors-custom-attribute.d.ts @@ -0,0 +1,26 @@ +import { Lazy } from 'aurelia-dependency-injection'; +import { ValidationController } from './validation-controller'; +import { ValidateResult } from './validate-result'; +import { ValidationRenderer, RenderInstruction } from './validation-renderer'; +export interface RenderedError { + error: ValidateResult; + targets: Element[]; +} +export declare class ValidationErrorsCustomAttribute implements ValidationRenderer { + private boundaryElement; + private controllerAccessor; + static inject: ({ + new (): Element; + prototype: Element; + } | Lazy)[]; + value: RenderedError[]; + errors: RenderedError[]; + constructor(boundaryElement: Element, controllerAccessor: { + (): ValidationController; + }); + sort(): void; + interestingElements(elements: Element[]): Element[]; + render(instruction: RenderInstruction): void; + bind(): void; + unbind(): void; +} diff --git a/dist/native-modules/validation-errors-custom-attribute.js b/dist/native-modules/validation-errors-custom-attribute.js new file mode 100644 index 00000000..afd76aad --- /dev/null +++ b/dist/native-modules/validation-errors-custom-attribute.js @@ -0,0 +1,69 @@ +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +import { bindingMode } from 'aurelia-binding'; +import { Lazy } from 'aurelia-dependency-injection'; +import { customAttribute } from 'aurelia-templating'; +import { ValidationController } from './validation-controller'; +var ValidationErrorsCustomAttribute = (function () { + function ValidationErrorsCustomAttribute(boundaryElement, controllerAccessor) { + this.boundaryElement = boundaryElement; + this.controllerAccessor = controllerAccessor; + this.errors = []; + } + ValidationErrorsCustomAttribute.prototype.sort = function () { + this.errors.sort(function (a, b) { + 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) { + var _this = this; + return elements.filter(function (e) { return _this.boundaryElement.contains(e); }); + }; + ValidationErrorsCustomAttribute.prototype.render = function (instruction) { + var _loop_1 = function (result) { + var index = this_1.errors.findIndex(function (x) { return x.error === result; }); + if (index !== -1) { + this_1.errors.splice(index, 1); + } + }; + var this_1 = this; + for (var _i = 0, _a = instruction.unrender; _i < _a.length; _i++) { + var result = _a[_i].result; + _loop_1(result); + } + for (var _b = 0, _c = instruction.render; _b < _c.length; _b++) { + var _d = _c[_b], result = _d.result, elements = _d.elements; + if (result.valid) { + continue; + } + var targets = this.interestingElements(elements); + if (targets.length) { + this.errors.push({ error: result, targets: targets }); + } + } + this.sort(); + this.value = this.errors; + }; + ValidationErrorsCustomAttribute.prototype.bind = function () { + this.controllerAccessor().addRenderer(this); + this.value = this.errors; + }; + ValidationErrorsCustomAttribute.prototype.unbind = function () { + this.controllerAccessor().removeRenderer(this); + }; + return ValidationErrorsCustomAttribute; +}()); +ValidationErrorsCustomAttribute.inject = [Element, Lazy.of(ValidationController)]; +ValidationErrorsCustomAttribute = __decorate([ + customAttribute('validation-errors', bindingMode.twoWay) +], ValidationErrorsCustomAttribute); +export { ValidationErrorsCustomAttribute }; diff --git a/dist/native-modules/validation-renderer-custom-attribute.d.ts b/dist/native-modules/validation-renderer-custom-attribute.d.ts new file mode 100644 index 00000000..9f48614e --- /dev/null +++ b/dist/native-modules/validation-renderer-custom-attribute.d.ts @@ -0,0 +1,9 @@ +export declare class ValidationRendererCustomAttribute { + private container; + private controller; + private value; + private renderer; + created(view: any): void; + bind(): void; + unbind(): void; +} diff --git a/dist/native-modules/validation-renderer-custom-attribute.js b/dist/native-modules/validation-renderer-custom-attribute.js new file mode 100644 index 00000000..b5eee48e --- /dev/null +++ b/dist/native-modules/validation-renderer-custom-attribute.js @@ -0,0 +1,20 @@ +import { ValidationController } from './validation-controller'; +var ValidationRendererCustomAttribute = (function () { + function ValidationRendererCustomAttribute() { + } + ValidationRendererCustomAttribute.prototype.created = function (view) { + this.container = view.container; + }; + ValidationRendererCustomAttribute.prototype.bind = function () { + this.controller = this.container.get(ValidationController); + this.renderer = this.container.get(this.value); + this.controller.addRenderer(this.renderer); + }; + ValidationRendererCustomAttribute.prototype.unbind = function () { + this.controller.removeRenderer(this.renderer); + this.controller = null; + this.renderer = null; + }; + return ValidationRendererCustomAttribute; +}()); +export { ValidationRendererCustomAttribute }; diff --git a/dist/native-modules/validation-renderer.d.ts b/dist/native-modules/validation-renderer.d.ts new file mode 100644 index 00000000..eb430d9d --- /dev/null +++ b/dist/native-modules/validation-renderer.d.ts @@ -0,0 +1,42 @@ +import { ValidateResult } from './validate-result'; +/** + * A result to render (or unrender) and the associated elements (if any) + */ +export interface ResultInstruction { + /** + * The validation result. + */ + result: ValidateResult; + /** + * The associated elements (if any). + */ + elements: Element[]; +} +/** + * Defines which validation results to render and which validation results to unrender. + */ +export interface RenderInstruction { + /** + * The "kind" of render instruction. Either 'validate' or 'reset'. + */ + kind: 'validate' | 'reset'; + /** + * The results to render. + */ + render: ResultInstruction[]; + /** + * The results to unrender. + */ + unrender: ResultInstruction[]; +} +/** + * Renders validation results. + */ +export interface ValidationRenderer { + /** + * Render the validation results. + * @param instruction The render instruction. Defines which results to render and which + * results to unrender. + */ + render(instruction: RenderInstruction): void; +} diff --git a/dist/native-modules/validation-renderer.js b/dist/native-modules/validation-renderer.js new file mode 100644 index 00000000..e69de29b diff --git a/dist/native-modules/validator.d.ts b/dist/native-modules/validator.d.ts new file mode 100644 index 00000000..82c045e8 --- /dev/null +++ b/dist/native-modules/validator.d.ts @@ -0,0 +1,27 @@ +import { ValidateResult } from './validate-result'; +/** + * Validates objects and properties. + */ +export declare abstract class Validator { + /** + * 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 implementation should lookup the rules for the + * specified object. This may not be possible for all implementations of this interface. + */ + abstract validateProperty(object: any, propertyName: string, rules?: any): Promise; + /** + * Validates all rules for specified object and it's properties. + * @param object The object to validate. + * @param rules Optional. If unspecified, the implementation should lookup the rules for the + * 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/validator.js b/dist/native-modules/validator.js new file mode 100644 index 00000000..826b2c24 --- /dev/null +++ b/dist/native-modules/validator.js @@ -0,0 +1,9 @@ +/** + * Validates objects and properties. + */ +var Validator = (function () { + function Validator() { + } + return Validator; +}()); +export { Validator }; diff --git a/dist/system/validation-controller.js b/dist/system/validation-controller.js index 87cb141c..5b54e24b 100644 --- a/dist/system/validation-controller.js +++ b/dist/system/validation-controller.js @@ -283,12 +283,15 @@ System.register(["./validator", "./validate-trigger", "./property-info", "./vali // do an in-place replacement of the old result with the new result. // this ensures any repeats bound to this.results will not thrash. this_1.results.splice(this_1.results.indexOf(oldResult), 1, newResult); - if (newResult.valid) { + if (!oldResult.valid && newResult.valid) { this_1.errors.splice(this_1.errors.indexOf(oldResult), 1); } - else { + else if (!oldResult.valid && !newResult.valid) { this_1.errors.splice(this_1.errors.indexOf(oldResult), 1, newResult); } + else if (!newResult.valid) { + this_1.errors.push(newResult); + } } }; var this_1 = this; diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index fd7a11c0..716b508a 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,15 @@ + +# [1.0.0-beta.1.0.1](https://github.com/aurelia/validation/compare/1.0.0-beta.1.0.0...v1.0.0-beta.1.0.1) (2016-12-24) + + +### Bug Fixes + +* **build:** correct es2015 and native-modules builds ([d749cf5](https://github.com/aurelia/validation/commit/d749cf5)) +* **package:** fix doc build ([9e79087](https://github.com/aurelia/validation/commit/9e79087)) +* **ValidationController:** keep errors property in sync ([658ab0f](https://github.com/aurelia/validation/commit/658ab0f)), closes [#396](https://github.com/aurelia/validation/issues/396) + + + # [1.0.0-beta.1.0.0](https://github.com/aurelia/validation/compare/0.14.0...1.0.0-beta.1.0.0) (2016-12-09) diff --git a/doc/api.json b/doc/api.json index 83ef444d..01dd4094 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"name":"aurelia-validation","children":[{"id":671,"name":"\"aurelia-validation\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":672,"name":"AureliaValidationConfiguration","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Aurelia Validation Configuration API"},"children":[{"id":673,"name":"validatorType","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":846,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":681,"name":"apply","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":682,"name":"apply","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the configuration."},"parameters":[{"id":683,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":856,"character":13}]},{"id":674,"name":"customValidator","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":675,"name":"customValidator","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Use a custom Validator implementation."},"parameters":[{"id":676,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":677,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":678,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":679,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":680,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"__type","id":677}}],"sources":[{"fileName":"index.d.ts","line":850,"character":31}]}],"groups":[{"title":"Constructors","kind":512,"children":[678]}],"sources":[{"fileName":"index.d.ts","line":850,"character":29}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":850,"character":23}]}],"groups":[{"title":"Properties","kind":1024,"children":[673]},{"title":"Methods","kind":2048,"children":[681,674]}],"sources":[{"fileName":"index.d.ts","line":845,"character":47}]},{"id":684,"name":"configure","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":685,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures the plugin."},"parameters":[{"id":686,"name":"frameworkConfig","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":687,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":688,"name":"container","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":862,"character":17}],"type":{"type":"reference","name":"Container"}},{"id":689,"name":"globalResources","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":863,"character":23}],"type":{"type":"reflection","declaration":{"id":690,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":691,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":692,"name":"resources","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"string"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":863,"character":24}]}}}],"groups":[{"title":"Variables","kind":32,"children":[688,689]}],"sources":[{"fileName":"index.d.ts","line":861,"character":46}]}}},{"id":693,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":694,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":695,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":696,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AureliaValidationConfiguration","id":672}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":864,"character":17}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":861,"character":29}]}],"groups":[{"title":"Classes","kind":128,"children":[672]},{"title":"Functions","kind":64,"children":[684]}],"sources":[{"fileName":"index.d.ts","line":821,"character":35}]},{"id":25,"name":"\"controller-validate-result\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":26,"name":"ControllerValidateResult","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"The result of a call to the validation controller's validate method."},"children":[{"id":29,"name":"instruction","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The instruction passed to the controller's validate method."},"sources":[{"fileName":"index.d.ts","line":63,"character":19}],"type":{"type":"reference","name":"ValidateInstruction","id":21}},{"id":28,"name":"results","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The validation result of every rule that was evaluated."},"sources":[{"fileName":"index.d.ts","line":59,"character":15}],"type":{"type":"reference","isArray":true,"name":"ValidateResult","id":3}},{"id":27,"name":"valid","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Whether validation passed."},"sources":[{"fileName":"index.d.ts","line":55,"character":13}],"type":{"type":"instrinct","name":"boolean"}}],"groups":[{"title":"Properties","kind":1024,"children":[29,28,27]}],"sources":[{"fileName":"index.d.ts","line":51,"character":45}]}],"groups":[{"title":"Interfaces","kind":256,"children":[26]}],"sources":[{"fileName":"index.d.ts","line":45,"character":43}]},{"id":327,"name":"\"implementation/rule\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":331,"name":"Rule","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"A rule definition. Associations a rule with a property or object."},"typeParameter":[{"id":332,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":333,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":335,"name":"condition","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":423,"character":17}],"type":{"type":"reflection","declaration":{"id":336,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":337,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":338,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":339,"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":"index.d.ts","line":423,"character":18}]}}},{"id":340,"name":"config","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":424,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":346,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":429,"character":15}],"type":{"type":"union","types":[{"type":"reference","name":"Expression"},{"type":"instrinct","name":"null"}]}},{"id":345,"name":"messageKey","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":428,"character":18}],"type":{"type":"instrinct","name":"string"}},{"id":334,"name":"property","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":422,"character":16}],"type":{"type":"reference","name":"RuleProperty","id":328}},{"id":347,"name":"sequence","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":430,"character":16}],"type":{"type":"instrinct","name":"number"}},{"id":348,"name":"tag","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"sources":[{"fileName":"index.d.ts","line":431,"character":11}],"type":{"type":"instrinct","name":"string"}},{"id":341,"name":"when","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":425,"character":12}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":342,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":343,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":344,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"index.d.ts","line":425,"character":13}]}},{"type":"instrinct","name":"null"}]}}],"groups":[{"title":"Properties","kind":1024,"children":[335,340,346,345,334,347,348,341]}],"sources":[{"fileName":"index.d.ts","line":421,"character":25}]},{"id":328,"name":"RuleProperty","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Information related to a property that is the subject of validation."},"children":[{"id":330,"name":"displayName","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The displayName of the property (or object)."},"sources":[{"fileName":"index.d.ts","line":416,"character":19}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":329,"name":"name","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The property name. null indicates the rule targets the object itself."},"sources":[{"fileName":"index.d.ts","line":412,"character":12}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"groups":[{"title":"Properties","kind":1024,"children":[330,329]}],"sources":[{"fileName":"index.d.ts","line":408,"character":33}]}],"groups":[{"title":"Interfaces","kind":256,"children":[331,328]}],"sources":[{"fileName":"index.d.ts","line":403,"character":36}]},{"id":349,"name":"\"implementation/rules\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":350,"name":"Rules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Sets, unsets and retrieves rules on an object or constructor function."},"children":[{"id":351,"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":"index.d.ts","line":443,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":359,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":360,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the target's rules."},"parameters":[{"id":361,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"reference","isArray":true,"name":"Rule","id":331,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"index.d.ts","line":455,"character":18}]},{"id":352,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":353,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a target."},"parameters":[{"id":354,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":355,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Rule","id":331,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":447,"character":18}]},{"id":356,"name":"unset","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":357,"name":"unset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes rules from a target."},"parameters":[{"id":358,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":451,"character":20}]}],"groups":[{"title":"Properties","kind":1024,"children":[351]},{"title":"Methods","kind":2048,"children":[359,352,356]}],"sources":[{"fileName":"index.d.ts","line":439,"character":22}]}],"groups":[{"title":"Classes","kind":128,"children":[350]}],"sources":[{"fileName":"index.d.ts","line":434,"character":37}]},{"id":428,"name":"\"implementation/standard-validator\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":429,"name":"StandardValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates.\nResponsible for validating objects and properties."},"children":[{"id":434,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":435,"name":"new StandardValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":436,"name":"messageProvider","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationMessageProvider","id":414}},{"id":437,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"StandardValidator","id":429}}],"sources":[{"fileName":"index.d.ts","line":534,"character":31}]},{"id":433,"name":"getDisplayName","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":534,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":432,"name":"lookupFunctions","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":533,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":431,"name":"messageProvider","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":532,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":430,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":531,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reference","name":"ViewResources"},{"type":"reference","name":"ValidationMessageProvider","id":414}]}},{"id":451,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":452,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":453,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":454,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":455,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":557,"character":26}]},{"id":447,"name":"ruleExists","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":448,"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":449,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":331,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":450,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Rule","id":331,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"boolean"},"overwrites":{"type":"reference","name":"Validator.ruleExists","id":49}}],"sources":[{"fileName":"index.d.ts","line":556,"character":18}],"overwrites":{"type":"reference","name":"Validator.ruleExists","id":49}},{"id":463,"name":"validate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":464,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":465,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":466,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":467,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":559,"character":24}]},{"id":443,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":444,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":445,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":446,"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":"ValidateResult","id":3}]},"overwrites":{"type":"reference","name":"Validator.validateObject","id":45}}],"sources":[{"fileName":"index.d.ts","line":550,"character":22}],"overwrites":{"type":"reference","name":"Validator.validateObject","id":45}},{"id":438,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":439,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":440,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":441,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":442,"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":"ValidateResult","id":3}]},"overwrites":{"type":"reference","name":"Validator.validateProperty","id":40}}],"sources":[{"fileName":"index.d.ts","line":543,"character":24}],"overwrites":{"type":"reference","name":"Validator.validateProperty","id":40}},{"id":456,"name":"validateRuleSequence","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":457,"name":"validateRuleSequence","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":458,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":459,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":460,"name":"ruleSequence","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":461,"name":"sequence","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":462,"name":"results","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":558,"character":36}]}],"groups":[{"title":"Constructors","kind":512,"children":[434]},{"title":"Properties","kind":1024,"children":[433,432,431,430]},{"title":"Methods","kind":2048,"children":[451,447,463,443,438,456]}],"sources":[{"fileName":"index.d.ts","line":530,"character":34}],"extendedTypes":[{"type":"reference","name":"Validator","id":39}]}],"groups":[{"title":"Classes","kind":128,"children":[429]}],"sources":[{"fileName":"index.d.ts","line":520,"character":50}]},{"id":362,"name":"\"implementation/util\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":363,"name":"isString","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":364,"name":"isString","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":365,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"index.d.ts","line":459,"character":28}]}],"groups":[{"title":"Functions","kind":64,"children":[363]}],"sources":[{"fileName":"index.d.ts","line":458,"character":36}]},{"id":410,"name":"\"implementation/validation-messages\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":414,"name":"ValidationMessageProvider","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Retrieves validation messages and property display names."},"children":[{"id":417,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":418,"name":"new ValidationMessageProvider","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":419,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":372}}],"type":{"type":"reference","name":"ValidationMessageProvider","id":414}}],"sources":[{"fileName":"index.d.ts","line":504,"character":49}]},{"id":415,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":503,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":416,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":504,"character":21}],"type":{"type":"reference","isArray":true,"name":"ValidationParser","id":372}},{"id":423,"name":"getDisplayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":424,"name":"getDisplayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Formulates a property display name using the property name and the configured\ndisplayName (if provided).\nOverride this with your own custom logic."},"parameters":[{"id":425,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property name.\n"},"type":{"type":"instrinct","name":"string"}},{"id":426,"name":"displayName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"},{"type":"instrinct","name":"undefined"}]}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"index.d.ts","line":517,"character":22}]},{"id":420,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":421,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns a message binding expression that corresponds to the key."},"parameters":[{"id":422,"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":"index.d.ts","line":510,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[417]},{"title":"Properties","kind":1024,"children":[415,416]},{"title":"Methods","kind":2048,"children":[423,420]}],"sources":[{"fileName":"index.d.ts","line":502,"character":42}]},{"id":411,"name":"ValidationMessages","kind":256,"kindString":"Interface","flags":{"isExported":true},"indexSignature":[{"id":412,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":413,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"index.d.ts","line":492,"character":39}]},{"id":427,"name":"validationMessages","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Dictionary of validation messages. [messageKey]: messageExpression"},"sources":[{"fileName":"index.d.ts","line":498,"character":35}],"type":{"type":"reference","name":"ValidationMessages","id":411}}],"groups":[{"title":"Classes","kind":128,"children":[414]},{"title":"Interfaces","kind":256,"children":[411]},{"title":"Variables","kind":32,"children":[427]}],"sources":[{"fileName":"index.d.ts","line":489,"character":51}]},{"id":366,"name":"\"implementation/validation-parser\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":398,"name":"MessageExpressionValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":404,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":405,"name":"new MessageExpressionValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":406,"name":"originalMessage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"MessageExpressionValidator","id":398},"overwrites":{"type":"reference","name":"Unparser.__constructor"}}],"sources":[{"fileName":"index.d.ts","line":484,"character":79}],"overwrites":{"type":"reference","name":"Unparser.__constructor"}},{"id":399,"name":"originalMessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":483,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":407,"name":"visitAccessScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":408,"name":"visitAccessScope","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":409,"name":"access","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AccessScope"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":486,"character":24}]},{"id":400,"name":"validate","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":401,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":402,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Expression"}},{"id":403,"name":"originalMessage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":484,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[404]},{"title":"Properties","kind":1024,"children":[399]},{"title":"Methods","kind":2048,"children":[407,400]}],"sources":[{"fileName":"index.d.ts","line":482,"character":43}],"extendedTypes":[{"type":"reference","name":"Unparser"}],"implementedTypes":[{"type":"reference","name":"ExpressionVisitor"}]},{"id":372,"name":"ValidationParser","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":380,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":381,"name":"new ValidationParser","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":382,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Parser"}},{"id":383,"name":"bindinqLanguage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"BindingLanguage"}}],"type":{"type":"reference","name":"ValidationParser","id":372}}],"sources":[{"fileName":"index.d.ts","line":475,"character":22}]},{"id":374,"name":"bindinqLanguage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":470,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":379,"name":"cache","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":475,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":376,"name":"emptyStringExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":472,"character":37}],"type":{"type":"instrinct","name":"any"}},{"id":377,"name":"nullExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":473,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":373,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":469,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":378,"name":"undefinedExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":474,"character":35}],"type":{"type":"instrinct","name":"any"}},{"id":375,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":471,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reference","name":"Parser"},{"type":"reference","name":"BindingLanguage"}]}},{"id":392,"name":"coalesce","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":393,"name":"coalesce","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":394,"name":"part","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":479,"character":24}]},{"id":395,"name":"getAccessorExpression","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":396,"name":"getAccessorExpression","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":397,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":480,"character":37}]},{"id":384,"name":"parseMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":385,"name":"parseMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":386,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Expression"}}],"sources":[{"fileName":"index.d.ts","line":477,"character":20}]},{"id":387,"name":"parseProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":388,"name":"parseProperty","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":389,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":390,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":391,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":367,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"RuleProperty","id":328}}],"sources":[{"fileName":"index.d.ts","line":478,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[380]},{"title":"Properties","kind":1024,"children":[374,379,376,377,373,378,375]},{"title":"Methods","kind":2048,"children":[392,395,384,387]}],"sources":[{"fileName":"index.d.ts","line":468,"character":33}]},{"id":367,"name":"PropertyAccessor","kind":256,"kindString":"Interface","flags":{"isExported":true},"typeParameter":[{"id":368,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":369,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"signatures":[{"id":370,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":371,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue"}}],"sources":[{"fileName":"index.d.ts","line":465,"character":37}]}],"groups":[{"title":"Classes","kind":128,"children":[398,372]},{"title":"Interfaces","kind":256,"children":[367]}],"sources":[{"fileName":"index.d.ts","line":461,"character":49}]},{"id":468,"name":"\"implementation/validation-rules\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":616,"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":617,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":620,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":621,"name":"new FluentEnsure","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":622,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":372}}],"type":{"type":"reference","name":"FluentEnsure","id":616}}],"sources":[{"fileName":"index.d.ts","line":761,"character":38}]},{"id":618,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":757,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":619,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Rules that have been defined using the fluent API."},"sources":[{"fileName":"index.d.ts","line":761,"character":13}],"type":{"type":"reference","isArray":true,"name":"Rule","id":331,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":632,"name":"_addRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":633,"name":"_addRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a rule definition to the sequenced ruleset."},"parameters":[{"id":634,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Rule","id":331,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":781,"character":16}]},{"id":635,"name":"assertInitialized","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":636,"name":"assertInitialized","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":782,"character":33}]},{"id":623,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":624,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":625,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":626,"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":367,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":768,"character":14}]},{"id":627,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":628,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"index.d.ts","line":772,"character":20}]},{"id":629,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":630,"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":631,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A class or object.\n"},"type":{"type":"instrinct","name":"any"}}]}],"sources":[{"fileName":"index.d.ts","line":777,"character":10}]}],"groups":[{"title":"Constructors","kind":512,"children":[620]},{"title":"Properties","kind":1024,"children":[618,619]},{"title":"Methods","kind":2048,"children":[632,635,623,627,629]}],"sources":[{"fileName":"index.d.ts","line":756,"character":29}]},{"id":469,"name":"FluentRuleCustomizer","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables customizing property rules."},"typeParameter":[{"id":470,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":471,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":476,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":477,"name":"new FluentRuleCustomizer","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":478,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":328}},{"id":479,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":480,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":481,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":482,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":483,"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":"index.d.ts","line":573,"character":54}]}}},{"id":484,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":485,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":616,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":486,"name":"fluentRules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}},{"id":487,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":372}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469}}],"sources":[{"fileName":"index.d.ts","line":572,"character":21}]},{"id":472,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":569,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":473,"name":"fluentRules","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":570,"character":27}],"type":{"type":"instrinct","name":"any"}},{"id":474,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":571,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":475,"name":"rule","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":572,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":514,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Rules that have been defined using the fluent API."},"sources":[{"fileName":"index.d.ts","line":613,"character":22}],"type":{"type":"reference","isArray":true,"name":"Rule","id":331,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":535,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":536,"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":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":647,"character":13}]},{"id":505,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":506,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":507,"name":"TValue2","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":508,"name":"subject","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reflection","declaration":{"id":509,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":510,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":511,"name":"model","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue2"}}],"sources":[{"fileName":"index.d.ts","line":603,"character":41}]}}]}}],"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue2"}]}}],"sources":[{"fileName":"index.d.ts","line":603,"character":14}]},{"id":512,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":513,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"index.d.ts","line":609,"character":20}]},{"id":549,"name":"equals","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":550,"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":551,"name":"expectedValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":672,"character":14}]},{"id":532,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":533,"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":534,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":642,"character":15}]},{"id":546,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":547,"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":548,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":667,"character":16}]},{"id":540,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":541,"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":542,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":657,"character":17}]},{"id":543,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":544,"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":545,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":662,"character":16}]},{"id":537,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":538,"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":539,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":652,"character":17}]},{"id":515,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":516,"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":517,"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":616,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"index.d.ts","line":618,"character":10}]},{"id":530,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":531,"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":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":636,"character":16}]},{"id":518,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":519,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":520,"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":521,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":522,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":523,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":524,"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":"index.d.ts","line":625,"character":28}]}}},{"id":525,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":625,"character":17}]},{"id":526,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":527,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":528,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":529,"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":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":631,"character":21}]},{"id":502,"name":"tag","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":503,"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":504,"name":"tag","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"index.d.ts","line":598,"character":11}]},{"id":488,"name":"then","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":489,"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":"index.d.ts","line":579,"character":12}]},{"id":496,"name":"when","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":497,"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":498,"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":499,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":500,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":501,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"index.d.ts","line":593,"character":23}]}}}]}],"sources":[{"fileName":"index.d.ts","line":593,"character":12}]},{"id":493,"name":"withMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":494,"name":"withMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies rule's validation message."},"parameters":[{"id":495,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"index.d.ts","line":587,"character":19}]},{"id":490,"name":"withMessageKey","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":491,"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":492,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"index.d.ts","line":583,"character":22}]}],"groups":[{"title":"Constructors","kind":512,"children":[476]},{"title":"Properties","kind":1024,"children":[472,473,474,475,514]},{"title":"Methods","kind":2048,"children":[535,505,512,549,532,546,540,543,537,515,530,518,526,502,488,496,493,490]}],"sources":[{"fileName":"index.d.ts","line":568,"character":37}]},{"id":552,"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":553,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":554,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":574,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":575,"name":"new FluentRules","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":576,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":616,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":577,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":372}},{"id":578,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":328}}],"type":{"type":"reference","name":"FluentRules","id":552}}],"sources":[{"fileName":"index.d.ts","line":692,"character":25}]},{"id":555,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":678,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":556,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":679,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":557,"name":"property","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":680,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":573,"name":"sequence","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Current rule sequence number. Used to postpone evaluation of rules until rules\nwith lower sequence number have successfully validated. The \"then\" fluent API method\nmanages this property, there's usually no need to set it directly."},"sources":[{"fileName":"index.d.ts","line":692,"character":16}],"type":{"type":"instrinct","name":"number"}},{"id":558,"name":"customRules","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":681,"character":26}],"type":{"type":"reflection","declaration":{"id":559,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"indexSignature":[{"id":560,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":561,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reflection","declaration":{"id":562,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":569,"name":"argsToConfig","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"index.d.ts","line":684,"character":28}],"type":{"type":"reflection","declaration":{"id":570,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":571,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":572,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":684,"character":30}]}}},{"id":563,"name":"condition","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":683,"character":25}],"type":{"type":"reflection","declaration":{"id":564,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":565,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":566,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":567,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":568,"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":"index.d.ts","line":683,"character":26}]}}}],"groups":[{"title":"Variables","kind":32,"children":[569,563]}],"sources":[{"fileName":"index.d.ts","line":682,"character":27}]}}}],"sources":[{"fileName":"index.d.ts","line":681,"character":27}]}}},{"id":579,"name":"displayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":580,"name":"displayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets the display name of the ensured property."},"parameters":[{"id":581,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"index.d.ts","line":697,"character":19}]},{"id":599,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":600,"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":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":726,"character":13}]},{"id":613,"name":"equals","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":614,"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":615,"name":"expectedValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":751,"character":14}]},{"id":596,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":597,"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":598,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":721,"character":15}]},{"id":610,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":611,"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":612,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":746,"character":16}]},{"id":604,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":605,"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":606,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":736,"character":17}]},{"id":607,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":608,"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":609,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":741,"character":16}]},{"id":601,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":602,"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":603,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":731,"character":17}]},{"id":594,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":595,"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":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":715,"character":16}]},{"id":582,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":583,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":584,"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":585,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":586,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":587,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":588,"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":"index.d.ts","line":704,"character":28}]}}},{"id":589,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":704,"character":17}]},{"id":590,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":591,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":592,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":593,"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":469,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":710,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[574]},{"title":"Properties","kind":1024,"children":[555,556,557,573,558]},{"title":"Methods","kind":2048,"children":[579,599,613,596,610,604,607,601,594,582,590]}],"sources":[{"fileName":"index.d.ts","line":677,"character":28}]},{"id":637,"name":"ValidationRules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Fluent rule definition API."},"children":[{"id":638,"name":"parser","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":788,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":650,"name":"customRule","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":651,"name":"customRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines a custom rule."},"parameters":[{"id":652,"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":653,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rule function."},"type":{"type":"reflection","declaration":{"id":654,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":655,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":656,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":657,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":658,"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":"index.d.ts","line":807,"character":50}]}}},{"id":659,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message expression"},"type":{"type":"instrinct","name":"string"}},{"id":660,"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":661,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":662,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":663,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":807,"character":156}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":807,"character":25}]},{"id":642,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":643,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":644,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":645,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":646,"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":367,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"index.d.ts","line":794,"character":21}]},{"id":647,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":648,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"typeParameter":[{"id":649,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reference","name":"FluentRules","id":552,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"index.d.ts","line":798,"character":27}]},{"id":639,"name":"initialize","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":640,"name":"initialize","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":641,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":372}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":789,"character":25}]},{"id":668,"name":"off","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":669,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes the rules from a class or object."},"parameters":[{"id":670,"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":"index.d.ts","line":818,"character":18}]},{"id":664,"name":"taggedRules","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":665,"name":"taggedRules","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns rules with the matching tag."},"parameters":[{"id":666,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":331,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":667,"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":331,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"sources":[{"fileName":"index.d.ts","line":813,"character":26}]}],"groups":[{"title":"Properties","kind":1024,"children":[638]},{"title":"Methods","kind":2048,"children":[650,642,647,639,668,664]}],"sources":[{"fileName":"index.d.ts","line":787,"character":32}]}],"groups":[{"title":"Classes","kind":128,"children":[616,469,552,637]}],"sources":[{"fileName":"index.d.ts","line":562,"character":48}]},{"id":30,"name":"\"property-info\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":31,"name":"getPropertyInfo","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":32,"name":"getPropertyInfo","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the object and property name for the specified expression."},"parameters":[{"id":33,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The expression"},"type":{"type":"reference","name":"Expression"}},{"id":34,"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":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":36,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":74,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":37,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":75,"character":20}],"type":{"type":"instrinct","name":"string"}}],"groups":[{"title":"Variables","kind":32,"children":[36,37]}],"sources":[{"fileName":"index.d.ts","line":73,"character":73}]}},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"index.d.ts","line":73,"character":35}]}],"groups":[{"title":"Functions","kind":64,"children":[31]}],"sources":[{"fileName":"index.d.ts","line":66,"character":30}]},{"id":165,"name":"\"validate-binding-behavior\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":166,"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":171,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":172,"name":"new ValidateBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":173,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehavior","id":166},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}}],"sources":[{"fileName":"index.d.ts","line":279,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}},{"id":167,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":303,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":178,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":179,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":180,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":181,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":182,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":73},{"type":"instrinct","name":"any"}]}},{"id":183,"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":156}}],"sources":[{"fileName":"index.d.ts","line":289,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":156}},{"id":174,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":175,"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":176,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":177,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}}],"sources":[{"fileName":"index.d.ts","line":288,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}},{"id":168,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":169,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":170,"name":"controller","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationController","id":73}}],"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}}],"sources":[{"fileName":"index.d.ts","line":304,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}},{"id":184,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":185,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":186,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"sources":[{"fileName":"index.d.ts","line":290,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"groups":[{"title":"Constructors","kind":512,"children":[171]},{"title":"Properties","kind":1024,"children":[167]},{"title":"Methods","kind":2048,"children":[178,174,168,184]}],"sources":[{"fileName":"index.d.ts","line":302,"character":40}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":144}]},{"id":187,"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":191,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":192,"name":"new ValidateManuallyBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":193,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateManuallyBindingBehavior","id":187},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}}],"sources":[{"fileName":"index.d.ts","line":279,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}},{"id":188,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":312,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":198,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":199,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":200,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":201,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":202,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":73},{"type":"instrinct","name":"any"}]}},{"id":203,"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":156}}],"sources":[{"fileName":"index.d.ts","line":289,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":156}},{"id":194,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":195,"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":196,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":197,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}}],"sources":[{"fileName":"index.d.ts","line":288,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}},{"id":189,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":190,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}}],"sources":[{"fileName":"index.d.ts","line":313,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}},{"id":204,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":205,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":206,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"sources":[{"fileName":"index.d.ts","line":290,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"groups":[{"title":"Constructors","kind":512,"children":[191]},{"title":"Properties","kind":1024,"children":[188]},{"title":"Methods","kind":2048,"children":[198,194,189,204]}],"sources":[{"fileName":"index.d.ts","line":311,"character":48}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":144}]},{"id":207,"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":211,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":212,"name":"new ValidateOnBlurBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":213,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnBlurBindingBehavior","id":207},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}}],"sources":[{"fileName":"index.d.ts","line":279,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}},{"id":208,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":320,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":218,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":219,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":220,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":221,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":222,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":73},{"type":"instrinct","name":"any"}]}},{"id":223,"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":156}}],"sources":[{"fileName":"index.d.ts","line":289,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":156}},{"id":214,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":215,"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":216,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":217,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}}],"sources":[{"fileName":"index.d.ts","line":288,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}},{"id":209,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":210,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}}],"sources":[{"fileName":"index.d.ts","line":321,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}},{"id":224,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":225,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":226,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"sources":[{"fileName":"index.d.ts","line":290,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"groups":[{"title":"Constructors","kind":512,"children":[211]},{"title":"Properties","kind":1024,"children":[208]},{"title":"Methods","kind":2048,"children":[218,214,209,224]}],"sources":[{"fileName":"index.d.ts","line":319,"character":46}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":144}]},{"id":227,"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":231,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":232,"name":"new ValidateOnChangeBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":233,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnChangeBindingBehavior","id":227},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}}],"sources":[{"fileName":"index.d.ts","line":279,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}},{"id":228,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":329,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":238,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":239,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":240,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":241,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":242,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":73},{"type":"instrinct","name":"any"}]}},{"id":243,"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":156}}],"sources":[{"fileName":"index.d.ts","line":289,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":156}},{"id":234,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":235,"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":236,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":237,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}}],"sources":[{"fileName":"index.d.ts","line":288,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}},{"id":229,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":230,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}}],"sources":[{"fileName":"index.d.ts","line":330,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}},{"id":244,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":245,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":246,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"sources":[{"fileName":"index.d.ts","line":290,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"groups":[{"title":"Constructors","kind":512,"children":[231]},{"title":"Properties","kind":1024,"children":[228]},{"title":"Methods","kind":2048,"children":[238,234,229,244]}],"sources":[{"fileName":"index.d.ts","line":328,"character":48}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":144}]},{"id":247,"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":251,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":252,"name":"new ValidateOnChangeOrBlurBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":253,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnChangeOrBlurBindingBehavior","id":247},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}}],"sources":[{"fileName":"index.d.ts","line":279,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":146}},{"id":248,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":338,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":258,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":259,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":260,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":261,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":262,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":73},{"type":"instrinct","name":"any"}]}},{"id":263,"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":156}}],"sources":[{"fileName":"index.d.ts","line":289,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":156}},{"id":254,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":255,"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":256,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":257,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}}],"sources":[{"fileName":"index.d.ts","line":288,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":152}},{"id":249,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":250,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}}],"sources":[{"fileName":"index.d.ts","line":339,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":149}},{"id":264,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":265,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":266,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"sources":[{"fileName":"index.d.ts","line":290,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":162}}],"groups":[{"title":"Constructors","kind":512,"children":[251]},{"title":"Properties","kind":1024,"children":[248]},{"title":"Methods","kind":2048,"children":[258,254,249,264]}],"sources":[{"fileName":"index.d.ts","line":337,"character":54}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":144}]}],"groups":[{"title":"Classes","kind":128,"children":[166,187,207,227,247]}],"sources":[{"fileName":"index.d.ts","line":293,"character":42}]},{"id":143,"name":"\"validate-binding-behavior-base\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":144,"name":"ValidateBindingBehaviorBase","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated."},"children":[{"id":146,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":147,"name":"new ValidateBindingBehaviorBase","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":148,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehaviorBase","id":144}}],"sources":[{"fileName":"index.d.ts","line":279,"character":26}]},{"id":145,"name":"taskQueue","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":279,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":156,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":157,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":158,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":159,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":160,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":73},{"type":"instrinct","name":"any"}]}},{"id":161,"name":"rules","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":289,"character":12}]},{"id":152,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":153,"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":154,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":155,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":288,"character":17}]},{"id":149,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true,"isProtected":true},"signatures":[{"id":150,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":151,"name":"controller","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationController","id":73}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"index.d.ts","line":281,"character":45}]},{"id":162,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":163,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":164,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":290,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[146]},{"title":"Properties","kind":1024,"children":[145]},{"title":"Methods","kind":2048,"children":[156,152,149,162]}],"sources":[{"fileName":"index.d.ts","line":278,"character":53}],"extendedBy":[{"type":"reference","name":"ValidateBindingBehavior","id":166},{"type":"reference","name":"ValidateManuallyBindingBehavior","id":187},{"type":"reference","name":"ValidateOnBlurBindingBehavior","id":207},{"type":"reference","name":"ValidateOnChangeBindingBehavior","id":227},{"type":"reference","name":"ValidateOnChangeOrBlurBindingBehavior","id":247}]}],"groups":[{"title":"Classes","kind":128,"children":[144]}],"sources":[{"fileName":"index.d.ts","line":272,"character":47}]},{"id":20,"name":"\"validate-instruction\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":21,"name":"ValidateInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Instructions for the validation controller's validate method."},"children":[{"id":22,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The object to validate."},"sources":[{"fileName":"index.d.ts","line":34,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":23,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The property to validate. Optional."},"sources":[{"fileName":"index.d.ts","line":38,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":24,"name":"rules","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The rules to validate. Optional."},"sources":[{"fileName":"index.d.ts","line":42,"character":13}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Properties","kind":1024,"children":[22,23,24]}],"sources":[{"fileName":"index.d.ts","line":30,"character":40}]}],"groups":[{"title":"Interfaces","kind":256,"children":[21]}],"sources":[{"fileName":"index.d.ts","line":26,"character":37}]},{"id":2,"name":"\"validate-result\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":3,"name":"ValidateResult","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"The result of validating an individual validation rule."},"children":[{"id":11,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{},"signatures":[{"id":12,"name":"new ValidateResult","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{},"parameters":[{"id":13,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The rule associated with the result. Validator implementation specific."},"type":{"type":"instrinct","name":"any"}},{"id":14,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The object that was validated."},"type":{"type":"instrinct","name":"any"}},{"id":15,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The name of the property that was validated."},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":16,"name":"valid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"boolean"}},{"id":17,"name":"message","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"type":{"type":"reference","name":"ValidateResult","id":3}}],"sources":[{"fileName":"index.d.ts","line":15,"character":19}]},{"id":10,"name":"id","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"A number that uniquely identifies the result instance."},"sources":[{"fileName":"index.d.ts","line":15,"character":10}],"type":{"type":"instrinct","name":"number"}},{"id":8,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":10,"character":15}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":5,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":7,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":6,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":8,"character":20}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":4,"name":"rule","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":6,"character":12}],"type":{"type":"instrinct","name":"any"}},{"id":7,"name":"valid","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":9,"character":13}],"type":{"type":"instrinct","name":"boolean"}},{"id":9,"name":"nextId","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":11,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":18,"name":"toString","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":19,"name":"toString","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"index.d.ts","line":23,"character":16}]}],"groups":[{"title":"Constructors","kind":512,"children":[11]},{"title":"Properties","kind":1024,"children":[10,8,5,6,4,7,9]},{"title":"Methods","kind":2048,"children":[18]}],"sources":[{"fileName":"index.d.ts","line":5,"character":31}]}],"groups":[{"title":"Classes","kind":128,"children":[3]}],"sources":[{"fileName":"index.d.ts","line":1,"character":32}]},{"id":53,"name":"\"validate-trigger\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":54,"name":"validateTrigger","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Validation triggers."},"sources":[{"fileName":"index.d.ts","line":111,"character":32}],"type":{"type":"reflection","declaration":{"id":55,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":57,"name":"blur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":113,"character":12}],"type":{"type":"instrinct","name":"number"}},{"id":58,"name":"change","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":114,"character":14}],"type":{"type":"instrinct","name":"number"}},{"id":59,"name":"changeOrBlur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":115,"character":20}],"type":{"type":"instrinct","name":"number"}},{"id":56,"name":"manual","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":112,"character":14}],"type":{"type":"instrinct","name":"number"}}],"groups":[{"title":"Variables","kind":32,"children":[57,58,59,56]}],"sources":[{"fileName":"index.d.ts","line":111,"character":33}]}}}],"groups":[{"title":"Variables","kind":32,"children":[54]}],"sources":[{"fileName":"index.d.ts","line":107,"character":33}]},{"id":72,"name":"\"validation-controller\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":73,"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 results for binding purposes."},"children":[{"id":85,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":86,"name":"new ValidationController","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":87,"name":"validator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Validator","id":39}}],"type":{"type":"reference","name":"ValidationController","id":73}}],"sources":[{"fileName":"index.d.ts","line":197,"character":33}]},{"id":76,"name":"bindings","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":177,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":81,"name":"elements","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":191,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":79,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Validation errors that have been rendered by the controller."},"sources":[{"fileName":"index.d.ts","line":186,"character":14}],"type":{"type":"reference","isArray":true,"name":"ValidateResult","id":3}},{"id":84,"name":"finishValidating","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":197,"character":32}],"type":{"type":"instrinct","name":"any"}},{"id":82,"name":"objects","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":192,"character":23}],"type":{"type":"instrinct","name":"any"}},{"id":77,"name":"renderers","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":178,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":78,"name":"results","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"comment":{"shortText":"Validation results that have been rendered by the controller."},"sources":[{"fileName":"index.d.ts","line":182,"character":23}],"type":{"type":"instrinct","name":"any"}},{"id":83,"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":"index.d.ts","line":196,"character":23}],"type":{"type":"instrinct","name":"number"}},{"id":80,"name":"validating","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":" Whether the controller is currently validating."},"sources":[{"fileName":"index.d.ts","line":190,"character":18}],"type":{"type":"instrinct","name":"boolean"}},{"id":74,"name":"validator","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":175,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":75,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":176,"character":21}],"type":{"type":"reference","isArray":true,"name":"Validator","id":39}},{"id":95,"name":"addError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":96,"name":"addError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds and renders an error."},"parameters":[{"id":97,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}},{"id":98,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":99,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"type":{"type":"reference","name":"ValidateResult","id":3}}],"sources":[{"fileName":"index.d.ts","line":213,"character":16}]},{"id":88,"name":"addObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":89,"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":90,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object."},"type":{"type":"instrinct","name":"any"}},{"id":91,"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":"index.d.ts","line":204,"character":17}]},{"id":103,"name":"addRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":104,"name":"addRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a renderer."},"parameters":[{"id":105,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":68}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":222,"character":19}]},{"id":126,"name":"getAssociatedElements","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":127,"name":"getAssociatedElements","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the elements associated with an object and propertyName (if any)."},"parameters":[{"id":128,"name":"__namedParameters","kind":32768,"kindString":"Parameter","flags":{},"originalName":"__0","type":{"type":"reflection","declaration":{"id":129,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":130,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":260,"character":45}],"type":{"type":"instrinct","name":"any"}},{"id":131,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":260,"character":59}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Variables","kind":32,"children":[130,131]}],"sources":[{"fileName":"index.d.ts","line":260,"character":38}]}}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":260,"character":37}]},{"id":117,"name":"getInstructionPredicate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":118,"name":"getInstructionPredicate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Interprets the instruction and returns a predicate that will identify\nrelevant results in the list of rendered validation results."},"parameters":[{"id":119,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":244,"character":39}]},{"id":132,"name":"processResultDelta","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":133,"name":"processResultDelta","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":134,"name":"kind","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":135,"name":"oldResults","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":136,"name":"newResults","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"index.d.ts","line":261,"character":34}]},{"id":109,"name":"registerBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":110,"name":"registerBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Registers a binding with the controller."},"parameters":[{"id":111,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance."},"type":{"type":"reference","name":"Binding"}},{"id":112,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The DOM element."},"type":{"type":"reference","name":"Element"}},{"id":113,"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":"index.d.ts","line":234,"character":23}]},{"id":100,"name":"removeError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":101,"name":"removeError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes and unrenders an error."},"parameters":[{"id":102,"name":"result","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidateResult","id":3}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":217,"character":19}]},{"id":92,"name":"removeObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":93,"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":94,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":209,"character":20}]},{"id":106,"name":"removeRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":107,"name":"removeRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes a renderer."},"parameters":[{"id":108,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":68}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":227,"character":22}]},{"id":123,"name":"reset","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":124,"name":"reset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets any rendered validation results (unrenders)."},"parameters":[{"id":125,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. Instructions on what to reset. If unspecified all rendered results\nwill be unrendered.\n"},"type":{"type":"reference","name":"ValidateInstruction","id":21}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":256,"character":13}]},{"id":140,"name":"resetBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":141,"name":"resetBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets the results for a property associated with a binding."},"parameters":[{"id":142,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":269,"character":20}]},{"id":114,"name":"unregisterBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":115,"name":"unregisterBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Unregisters a binding with the controller."},"parameters":[{"id":116,"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":"index.d.ts","line":239,"character":25}]},{"id":120,"name":"validate","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":121,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates and renders results."},"parameters":[{"id":122,"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":21}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"ControllerValidateResult","id":26}]}}],"sources":[{"fileName":"index.d.ts","line":250,"character":16}]},{"id":137,"name":"validateBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":138,"name":"validateBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the property associated with a binding."},"parameters":[{"id":139,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":265,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[85]},{"title":"Properties","kind":1024,"children":[76,81,79,84,82,77,78,83,80,74,75]},{"title":"Methods","kind":2048,"children":[95,88,103,126,117,132,109,100,92,106,123,140,114,120,137]}],"sources":[{"fileName":"index.d.ts","line":174,"character":37}]}],"groups":[{"title":"Classes","kind":128,"children":[73]}],"sources":[{"fileName":"index.d.ts","line":162,"character":38}]},{"id":267,"name":"\"validation-controller-factory\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":268,"name":"ValidationControllerFactory","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Creates ValidationController instances."},"children":[{"id":273,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":274,"name":"new ValidationControllerFactory","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":275,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":268}}],"sources":[{"fileName":"index.d.ts","line":351,"character":70}]},{"id":269,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":350,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":276,"name":"create","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":277,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Creates a new controller instance."},"parameters":[{"id":278,"name":"validator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Validator","id":39}}],"type":{"type":"reference","name":"ValidationController","id":73}}],"sources":[{"fileName":"index.d.ts","line":356,"character":14}]},{"id":279,"name":"createForCurrentScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":280,"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":281,"name":"validator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Validator","id":39}}],"type":{"type":"reference","name":"ValidationController","id":73}}],"sources":[{"fileName":"index.d.ts","line":361,"character":29}]},{"id":270,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":271,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":272,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":268}}],"sources":[{"fileName":"index.d.ts","line":351,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[273]},{"title":"Properties","kind":1024,"children":[269]},{"title":"Methods","kind":2048,"children":[276,279,270]}],"sources":[{"fileName":"index.d.ts","line":349,"character":44}]}],"groups":[{"title":"Classes","kind":128,"children":[268]}],"sources":[{"fileName":"index.d.ts","line":342,"character":46}]},{"id":282,"name":"\"validation-errors-custom-attribute\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":286,"name":"ValidationErrorsCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":296,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":297,"name":"new ValidationErrorsCustomAttribute","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":298,"name":"boundaryElement","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":299,"name":"controllerAccessor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":300,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":301,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"ValidationController","id":73}}],"sources":[{"fileName":"index.d.ts","line":382,"character":65}]}}}],"type":{"type":"reference","name":"ValidationErrorsCustomAttribute","id":286}}],"sources":[{"fileName":"index.d.ts","line":381,"character":32}]},{"id":287,"name":"boundaryElement","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":374,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":288,"name":"controllerAccessor","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":375,"character":34}],"type":{"type":"instrinct","name":"any"}},{"id":295,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":381,"character":14}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":283}},{"id":294,"name":"value","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":380,"character":13}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":283}},{"id":289,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":376,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reflection","declaration":{"id":290,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":291,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":292,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"__type","id":290}}],"sources":[{"fileName":"index.d.ts","line":376,"character":25}]},{"id":293,"name":"prototype","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"index.d.ts","line":378,"character":21}],"type":{"type":"reference","name":"Element"}}],"groups":[{"title":"Constructors","kind":512,"children":[291]},{"title":"Variables","kind":32,"children":[293]}]}},{"type":"reference","name":"Lazy"}]}},{"id":310,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":311,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":388,"character":12}]},{"id":304,"name":"interestingElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":305,"name":"interestingElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":306,"name":"elements","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Element"}}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"sources":[{"fileName":"index.d.ts","line":386,"character":27}]},{"id":307,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":308,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":309,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RenderInstruction","id":64}}],"type":{"type":"instrinct","name":"void"},"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":70}}],"sources":[{"fileName":"index.d.ts","line":387,"character":14}],"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":69}},{"id":302,"name":"sort","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":303,"name":"sort","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":385,"character":12}]},{"id":312,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":313,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":389,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[296]},{"title":"Properties","kind":1024,"children":[287,288,295,294,289]},{"title":"Methods","kind":2048,"children":[310,304,307,302,312]}],"sources":[{"fileName":"index.d.ts","line":373,"character":48}],"implementedTypes":[{"type":"reference","name":"ValidationRenderer","id":68}]},{"id":283,"name":"RenderedError","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":284,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":370,"character":13}],"type":{"type":"reference","name":"ValidateResult","id":3}},{"id":285,"name":"targets","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"index.d.ts","line":371,"character":15}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"groups":[{"title":"Properties","kind":1024,"children":[284,285]}],"sources":[{"fileName":"index.d.ts","line":369,"character":34}]}],"groups":[{"title":"Classes","kind":128,"children":[286]},{"title":"Interfaces","kind":256,"children":[283]}],"sources":[{"fileName":"index.d.ts","line":364,"character":51}]},{"id":60,"name":"\"validation-renderer\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":64,"name":"RenderInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Defines which validation results to render and which validation results to unrender."},"children":[{"id":65,"name":"kind","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The \"kind\" of render instruction. Either 'validate' or 'reset'."},"sources":[{"fileName":"index.d.ts","line":140,"character":12}],"type":{"type":"union","types":[{"type":"stringLiteral","value":"validate"},{"type":"stringLiteral","value":"reset"}]}},{"id":66,"name":"render","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The results to render."},"sources":[{"fileName":"index.d.ts","line":144,"character":14}],"type":{"type":"reference","isArray":true,"name":"ResultInstruction","id":61}},{"id":67,"name":"unrender","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The results to unrender."},"sources":[{"fileName":"index.d.ts","line":148,"character":16}],"type":{"type":"reference","isArray":true,"name":"ResultInstruction","id":61}}],"groups":[{"title":"Properties","kind":1024,"children":[65,66,67]}],"sources":[{"fileName":"index.d.ts","line":136,"character":38}]},{"id":61,"name":"ResultInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"A result to render (or unrender) and the associated elements (if any)"},"children":[{"id":63,"name":"elements","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The associated elements (if any)."},"sources":[{"fileName":"index.d.ts","line":131,"character":16}],"type":{"type":"reference","isArray":true,"name":"Element"}},{"id":62,"name":"result","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The validation result."},"sources":[{"fileName":"index.d.ts","line":127,"character":14}],"type":{"type":"reference","name":"ValidateResult","id":3}}],"groups":[{"title":"Properties","kind":1024,"children":[63,62]}],"sources":[{"fileName":"index.d.ts","line":123,"character":38}]},{"id":68,"name":"ValidationRenderer","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Renders validation results."},"children":[{"id":69,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":70,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Render the validation results."},"parameters":[{"id":71,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The render instruction. Defines which results to render and which\nresults to unrender.\n"},"type":{"type":"reference","name":"RenderInstruction","id":64}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":159,"character":14}]}],"groups":[{"title":"Methods","kind":2048,"children":[69]}],"sources":[{"fileName":"index.d.ts","line":153,"character":39}],"implementedBy":[{"type":"reference","name":"ValidationErrorsCustomAttribute","id":286}]}],"groups":[{"title":"Interfaces","kind":256,"children":[64,61,68]}],"sources":[{"fileName":"index.d.ts","line":118,"character":36}]},{"id":314,"name":"\"validation-renderer-custom-attribute\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":315,"name":"ValidationRendererCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":316,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":394,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":317,"name":"controller","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":395,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":319,"name":"renderer","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":397,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":318,"name":"value","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"index.d.ts","line":396,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":323,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":324,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":399,"character":12}]},{"id":320,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":321,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":322,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":398,"character":15}]},{"id":325,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":326,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"index.d.ts","line":400,"character":14}]}],"groups":[{"title":"Properties","kind":1024,"children":[316,317,319,318]},{"title":"Methods","kind":2048,"children":[323,320,325]}],"sources":[{"fileName":"index.d.ts","line":393,"character":50}]}],"groups":[{"title":"Classes","kind":128,"children":[315]}],"sources":[{"fileName":"index.d.ts","line":392,"character":53}]},{"id":38,"name":"\"validator\"","kind":2,"kindString":"Module","flags":{},"children":[{"id":39,"name":"Validator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates objects and properties."},"children":[{"id":49,"name":"ruleExists","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":50,"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":51,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"instrinct","name":"any"}},{"id":52,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"index.d.ts","line":104,"character":27}]},{"id":45,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":46,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":47,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":48,"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":"ValidateResult","id":3}]}}],"sources":[{"fileName":"index.d.ts","line":98,"character":31}]},{"id":40,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":41,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":42,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":43,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":44,"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":"ValidateResult","id":3}]}}],"sources":[{"fileName":"index.d.ts","line":91,"character":33}]}],"groups":[{"title":"Methods","kind":2048,"children":[49,45,40]}],"sources":[{"fileName":"index.d.ts","line":83,"character":35}],"extendedBy":[{"type":"reference","name":"StandardValidator","id":429}]}],"groups":[{"title":"Classes","kind":128,"children":[39]}],"sources":[{"fileName":"index.d.ts","line":78,"character":26}]}],"groups":[{"title":"Modules","kind":2,"children":[671,25,327,349,428,362,410,366,468,30,165,143,20,2,53,72,267,282,60,314,38]}]} +{"name":"aurelia-validation","children":[{"id":634,"name":"AureliaValidationConfiguration","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Aurelia Validation Configuration API"},"children":[{"id":635,"name":"validatorType","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":814,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":643,"name":"apply","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":644,"name":"apply","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the configuration."},"parameters":[{"id":645,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":824,"character":13}]},{"id":636,"name":"customValidator","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":637,"name":"customValidator","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Use a custom Validator implementation."},"parameters":[{"id":638,"name":"type","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":639,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":640,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":641,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":642,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"reference","name":"__type","id":639}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":818,"character":31}]}],"groups":[{"title":"Constructors","kind":512,"children":[640]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":818,"character":29}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":818,"character":23}]}],"groups":[{"title":"Properties","kind":1024,"children":[635]},{"title":"Methods","kind":2048,"children":[643,636]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":813,"character":47}]},{"id":579,"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":580,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":583,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":584,"name":"new FluentEnsure","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":585,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":339}}],"type":{"type":"reference","name":"FluentEnsure","id":579}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":731,"character":38}]},{"id":581,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":727,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":582,"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":731,"character":13}],"type":{"type":"reference","isArray":true,"name":"Rule","id":304,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":595,"name":"_addRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":596,"name":"_addRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a rule definition to the sequenced ruleset."},"parameters":[{"id":597,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Rule","id":304,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":751,"character":16}]},{"id":598,"name":"assertInitialized","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":599,"name":"assertInitialized","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":752,"character":33}]},{"id":586,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":587,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":588,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":589,"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":334,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":738,"character":14}]},{"id":590,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":591,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":742,"character":20}]},{"id":592,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":593,"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":594,"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":747,"character":10}]}],"groups":[{"title":"Constructors","kind":512,"children":[583]},{"title":"Properties","kind":1024,"children":[581,582]},{"title":"Methods","kind":2048,"children":[595,598,586,590,592]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":726,"character":29}]},{"id":432,"name":"FluentRuleCustomizer","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Part of the fluent rule API. Enables customizing property rules."},"typeParameter":[{"id":433,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":434,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":439,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":440,"name":"new FluentRuleCustomizer","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":441,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":301}},{"id":442,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":443,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":444,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":445,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":446,"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":543,"character":54}]}}},{"id":447,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Object"}},{"id":448,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":579,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":449,"name":"fluentRules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}},{"id":450,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":339}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":542,"character":21}]},{"id":435,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":539,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":436,"name":"fluentRules","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":540,"character":27}],"type":{"type":"instrinct","name":"any"}},{"id":437,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":541,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":438,"name":"rule","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":542,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":477,"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":583,"character":22}],"type":{"type":"reference","isArray":true,"name":"Rule","id":304,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"instrinct","name":"any"}]}},{"id":498,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":499,"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":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":617,"character":13}]},{"id":468,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":469,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":470,"name":"TValue2","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":471,"name":"subject","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reflection","declaration":{"id":472,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":473,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":474,"name":"model","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue2"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":573,"character":41}]}}]}}],"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue2"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":573,"character":14}]},{"id":475,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":476,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":579,"character":20}]},{"id":512,"name":"equals","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":513,"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":514,"name":"expectedValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":642,"character":14}]},{"id":495,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":496,"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":497,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":612,"character":15}]},{"id":509,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":510,"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":511,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":637,"character":16}]},{"id":503,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":504,"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":505,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":627,"character":17}]},{"id":506,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":507,"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":508,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":632,"character":16}]},{"id":500,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":501,"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":502,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":622,"character":17}]},{"id":478,"name":"on","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":479,"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":480,"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":579,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":588,"character":10}]},{"id":493,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":494,"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":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":606,"character":16}]},{"id":481,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":482,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":483,"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":484,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":485,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":486,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":487,"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":595,"character":28}]}}},{"id":488,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":595,"character":17}]},{"id":489,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":490,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":491,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":492,"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":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":601,"character":21}]},{"id":465,"name":"tag","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":466,"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":467,"name":"tag","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":568,"character":11}]},{"id":451,"name":"then","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":452,"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":549,"character":12}]},{"id":459,"name":"when","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":460,"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":461,"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":462,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":463,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":464,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":563,"character":23}]}}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":563,"character":12}]},{"id":456,"name":"withMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":457,"name":"withMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Specifies rule's validation message."},"parameters":[{"id":458,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":557,"character":19}]},{"id":453,"name":"withMessageKey","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":454,"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":455,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":553,"character":22}]}],"groups":[{"title":"Constructors","kind":512,"children":[439]},{"title":"Properties","kind":1024,"children":[435,436,437,438,477]},{"title":"Methods","kind":2048,"children":[498,468,475,512,495,509,503,506,500,478,493,481,489,465,451,459,456,453]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":538,"character":37}]},{"id":515,"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":516,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":517,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":537,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":538,"name":"new FluentRules","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":539,"name":"fluentEnsure","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"FluentEnsure","id":579,"typeArguments":[{"type":"typeParameter","name":"TObject"}]}},{"id":540,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":339}},{"id":541,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RuleProperty","id":301}}],"type":{"type":"reference","name":"FluentRules","id":515}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":662,"character":25}]},{"id":518,"name":"fluentEnsure","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":648,"character":28}],"type":{"type":"instrinct","name":"any"}},{"id":519,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":649,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":520,"name":"property","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":650,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":536,"name":"sequence","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Current rule sequence number. Used to postpone evaluation of rules until rules\nwith lower sequence number have successfully validated. The \"then\" fluent API method\nmanages this property, there's usually no need to set it directly."},"sources":[{"fileName":"aurelia-validation.d.ts","line":662,"character":16}],"type":{"type":"instrinct","name":"number"}},{"id":521,"name":"customRules","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":651,"character":26}],"type":{"type":"reflection","declaration":{"id":522,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"indexSignature":[{"id":523,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":524,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reflection","declaration":{"id":525,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":532,"name":"argsToConfig","kind":32,"kindString":"Variable","flags":{"isOptional":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":654,"character":28}],"type":{"type":"reflection","declaration":{"id":533,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":534,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":535,"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":654,"character":30}]}}},{"id":526,"name":"condition","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":653,"character":25}],"type":{"type":"reflection","declaration":{"id":527,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":528,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":529,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":530,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":531,"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":653,"character":26}]}}}],"groups":[{"title":"Variables","kind":32,"children":[532,526]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":652,"character":27}]}}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":651,"character":27}]}}},{"id":542,"name":"displayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":543,"name":"displayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Sets the display name of the ensured property."},"parameters":[{"id":544,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":667,"character":19}]},{"id":562,"name":"email","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":563,"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":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":696,"character":13}]},{"id":576,"name":"equals","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":577,"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":578,"name":"expectedValue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":721,"character":14}]},{"id":559,"name":"matches","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":560,"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":561,"name":"regex","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RegExp"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":691,"character":15}]},{"id":573,"name":"maxItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":574,"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":575,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":716,"character":16}]},{"id":567,"name":"maxLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":568,"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":569,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":706,"character":17}]},{"id":570,"name":"minItems","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":571,"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":572,"name":"count","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":711,"character":16}]},{"id":564,"name":"minLength","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":565,"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":566,"name":"length","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":701,"character":17}]},{"id":557,"name":"required","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":558,"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":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":685,"character":16}]},{"id":545,"name":"satisfies","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":546,"name":"satisfies","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies an ad-hoc rule function to the ensured property or object."},"parameters":[{"id":547,"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":548,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":549,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":550,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":551,"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":674,"character":28}]}}},{"id":552,"name":"config","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Object"}}],"type":{"type":"reference","name":"FluentRuleCustomizer","id":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":674,"character":17}]},{"id":553,"name":"satisfiesRule","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":554,"name":"satisfiesRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies a rule by name."},"parameters":[{"id":555,"name":"name","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the custom or standard rule."},"type":{"type":"instrinct","name":"string"}},{"id":556,"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":432,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":680,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[537]},{"title":"Properties","kind":1024,"children":[518,519,520,536,521]},{"title":"Methods","kind":2048,"children":[542,562,576,559,573,567,570,564,557,545,553]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":647,"character":28}]},{"id":365,"name":"MessageExpressionValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":371,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":372,"name":"new MessageExpressionValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":373,"name":"originalMessage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"MessageExpressionValidator","id":365},"overwrites":{"type":"reference","name":"Unparser.__constructor"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":460,"character":79}],"overwrites":{"type":"reference","name":"Unparser.__constructor"}},{"id":366,"name":"originalMessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":459,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":374,"name":"visitAccessScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":375,"name":"visitAccessScope","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":376,"name":"access","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AccessScope"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":462,"character":24}]},{"id":367,"name":"validate","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":368,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":369,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Expression"}},{"id":370,"name":"originalMessage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":460,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[371]},{"title":"Properties","kind":1024,"children":[366]},{"title":"Methods","kind":2048,"children":[374,367]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":458,"character":43}],"extendedTypes":[{"type":"reference","name":"Unparser"}],"implementedTypes":[{"type":"reference","name":"ExpressionVisitor"}]},{"id":322,"name":"Rules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Sets, unsets and retrieves rules on an object or constructor function."},"children":[{"id":323,"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":422,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":331,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":332,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the target's rules."},"parameters":[{"id":333,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"union","types":[{"type":"reference","isArray":true,"name":"Rule","id":304,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":434,"character":18}]},{"id":324,"name":"set","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":325,"name":"set","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Applies the rules to a target."},"parameters":[{"id":326,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":327,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","isArray":true,"name":"Rule","id":304,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":426,"character":18}]},{"id":328,"name":"unset","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":329,"name":"unset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes rules from a target."},"parameters":[{"id":330,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":430,"character":20}]}],"groups":[{"title":"Properties","kind":1024,"children":[323]},{"title":"Methods","kind":2048,"children":[331,324,328]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":418,"character":22}]},{"id":393,"name":"StandardValidator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates.\nResponsible for validating objects and properties."},"children":[{"id":398,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":399,"name":"new StandardValidator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":400,"name":"messageProvider","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationMessageProvider","id":380}},{"id":401,"name":"resources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewResources"}}],"type":{"type":"reference","name":"StandardValidator","id":393}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":506,"character":31}]},{"id":397,"name":"getDisplayName","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":506,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":396,"name":"lookupFunctions","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":505,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":395,"name":"messageProvider","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":504,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":394,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":503,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reference","name":"ViewResources"},{"type":"reference","name":"ValidationMessageProvider","id":380}]}},{"id":415,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":416,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":417,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":418,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":419,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":529,"character":26}]},{"id":411,"name":"ruleExists","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":412,"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":413,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":304,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":414,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Rule","id":304,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"boolean"},"overwrites":{"type":"reference","name":"Validator.ruleExists","id":37}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":528,"character":18}],"overwrites":{"type":"reference","name":"Validator.ruleExists","id":37}},{"id":427,"name":"validate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":428,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":429,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":430,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":431,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":531,"character":24}]},{"id":407,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":408,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":409,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":410,"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":"ValidateResult","id":2}]},"overwrites":{"type":"reference","name":"Validator.validateObject","id":33}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":522,"character":22}],"overwrites":{"type":"reference","name":"Validator.validateObject","id":33}},{"id":402,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":403,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":404,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":405,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":406,"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":"ValidateResult","id":2}]},"overwrites":{"type":"reference","name":"Validator.validateProperty","id":28}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":515,"character":24}],"overwrites":{"type":"reference","name":"Validator.validateProperty","id":28}},{"id":420,"name":"validateRuleSequence","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":421,"name":"validateRuleSequence","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":422,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":423,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":424,"name":"ruleSequence","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":425,"name":"sequence","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":426,"name":"results","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":530,"character":36}]}],"groups":[{"title":"Constructors","kind":512,"children":[398]},{"title":"Properties","kind":1024,"children":[397,396,395,394]},{"title":"Methods","kind":2048,"children":[415,411,427,407,402,420]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":502,"character":34}],"extendedTypes":[{"type":"reference","name":"Validator","id":27}]},{"id":143,"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":148,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":149,"name":"new ValidateBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":150,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehavior","id":143},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}},{"id":144,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":291,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":155,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":156,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":157,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":158,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":159,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":52},{"type":"instrinct","name":"any"}]}},{"id":160,"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":134}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":279,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":134}},{"id":151,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":152,"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":153,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":154,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}},{"id":145,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":146,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":147,"name":"controller","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationController","id":52}}],"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":292,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}},{"id":161,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":162,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":163,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":280,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"groups":[{"title":"Constructors","kind":512,"children":[148]},{"title":"Properties","kind":1024,"children":[144]},{"title":"Methods","kind":2048,"children":[155,151,145,161]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":290,"character":40}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":122}]},{"id":122,"name":"ValidateBindingBehaviorBase","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Binding behavior. Indicates the bound property should be validated."},"children":[{"id":124,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":125,"name":"new ValidateBindingBehaviorBase","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":126,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateBindingBehaviorBase","id":122}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":26}]},{"id":123,"name":"taskQueue","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":134,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":135,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":136,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":137,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":138,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":52},{"type":"instrinct","name":"any"}]}},{"id":139,"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":279,"character":12}]},{"id":130,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":131,"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":132,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":133,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":17}]},{"id":127,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true,"isProtected":true},"signatures":[{"id":128,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":129,"name":"controller","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationController","id":52}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":271,"character":45}]},{"id":140,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":141,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":142,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":280,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[124]},{"title":"Properties","kind":1024,"children":[123]},{"title":"Methods","kind":2048,"children":[134,130,127,140]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":268,"character":53}],"extendedBy":[{"type":"reference","name":"ValidateBindingBehavior","id":143},{"type":"reference","name":"ValidateManuallyBindingBehavior","id":164},{"type":"reference","name":"ValidateOnBlurBindingBehavior","id":184},{"type":"reference","name":"ValidateOnChangeBindingBehavior","id":204},{"type":"reference","name":"ValidateOnChangeOrBlurBindingBehavior","id":224}]},{"id":164,"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":168,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":169,"name":"new ValidateManuallyBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":170,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateManuallyBindingBehavior","id":164},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}},{"id":165,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":300,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":175,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":176,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":177,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":178,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":179,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":52},{"type":"instrinct","name":"any"}]}},{"id":180,"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":134}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":279,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":134}},{"id":171,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":172,"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":173,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":174,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}},{"id":166,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":167,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":301,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}},{"id":181,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":182,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":183,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":280,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"groups":[{"title":"Constructors","kind":512,"children":[168]},{"title":"Properties","kind":1024,"children":[165]},{"title":"Methods","kind":2048,"children":[175,171,166,181]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":299,"character":48}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":122}]},{"id":184,"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":188,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":189,"name":"new ValidateOnBlurBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":190,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnBlurBindingBehavior","id":184},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}},{"id":185,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":308,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":195,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":196,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":197,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":198,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":199,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":52},{"type":"instrinct","name":"any"}]}},{"id":200,"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":134}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":279,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":134}},{"id":191,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":192,"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":193,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":194,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}},{"id":186,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":187,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":309,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}},{"id":201,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":202,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":203,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":280,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"groups":[{"title":"Constructors","kind":512,"children":[188]},{"title":"Properties","kind":1024,"children":[185]},{"title":"Methods","kind":2048,"children":[195,191,186,201]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":307,"character":46}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":122}]},{"id":204,"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":208,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":209,"name":"new ValidateOnChangeBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":210,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnChangeBindingBehavior","id":204},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}},{"id":205,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":317,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":215,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":216,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":217,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":218,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":219,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":52},{"type":"instrinct","name":"any"}]}},{"id":220,"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":134}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":279,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":134}},{"id":211,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":212,"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":213,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":214,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}},{"id":206,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":207,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":318,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}},{"id":221,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":222,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":223,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":280,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"groups":[{"title":"Constructors","kind":512,"children":[208]},{"title":"Properties","kind":1024,"children":[205]},{"title":"Methods","kind":2048,"children":[215,211,206,221]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":316,"character":48}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":122}]},{"id":224,"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":228,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":229,"name":"new ValidateOnChangeOrBlurBindingBehavior","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":230,"name":"taskQueue","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TaskQueue"}}],"type":{"type":"reference","name":"ValidateOnChangeOrBlurBindingBehavior","id":224},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":269,"character":26}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.__constructor","id":124}},{"id":225,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":326,"character":21}],"type":{"type":"reference","isArray":true,"name":"TaskQueue"}},{"id":235,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":236,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":237,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":238,"name":"source","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":239,"name":"rulesOrController","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"reference","name":"ValidationController","id":52},{"type":"instrinct","name":"any"}]}},{"id":240,"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":134}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":279,"character":12}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.bind","id":134}},{"id":231,"name":"getTarget","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":232,"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":233,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":234,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":278,"character":17}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.getTarget","id":130}},{"id":226,"name":"getValidateTrigger","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":227,"name":"getValidateTrigger","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"number"},"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":327,"character":26}],"overwrites":{"type":"reference","name":"ValidateBindingBehaviorBase.getValidateTrigger","id":127}},{"id":241,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":242,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":243,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":280,"character":14}],"inheritedFrom":{"type":"reference","name":"ValidateBindingBehaviorBase.unbind","id":140}}],"groups":[{"title":"Constructors","kind":512,"children":[228]},{"title":"Properties","kind":1024,"children":[225]},{"title":"Methods","kind":2048,"children":[235,231,226,241]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":325,"character":54}],"extendedTypes":[{"type":"reference","name":"ValidateBindingBehaviorBase","id":122}]},{"id":2,"name":"ValidateResult","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"The result of validating an individual validation rule."},"children":[{"id":10,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"comment":{},"signatures":[{"id":11,"name":"new ValidateResult","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{},"parameters":[{"id":12,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The rule associated with the result. Validator implementation specific."},"type":{"type":"instrinct","name":"any"}},{"id":13,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The object that was validated."},"type":{"type":"instrinct","name":"any"}},{"id":14,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"shortText":"The name of the property that was validated."},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":15,"name":"valid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"boolean"}},{"id":16,"name":"message","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"type":{"type":"reference","name":"ValidateResult","id":2}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":19,"character":19}]},{"id":9,"name":"id","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"A number that uniquely identifies the result instance."},"sources":[{"fileName":"aurelia-validation.d.ts","line":19,"character":10}],"type":{"type":"instrinct","name":"number"}},{"id":7,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":14,"character":15}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":4,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":11,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":5,"name":"propertyName","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":12,"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":6,"name":"valid","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":13,"character":13}],"type":{"type":"instrinct","name":"boolean"}},{"id":8,"name":"nextId","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":15,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":17,"name":"toString","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"toString","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":27,"character":16}]}],"groups":[{"title":"Constructors","kind":512,"children":[10]},{"title":"Properties","kind":1024,"children":[9,7,4,5,3,6,8]},{"title":"Methods","kind":2048,"children":[17]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":9,"character":31}]},{"id":52,"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 results for binding purposes."},"children":[{"id":64,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":65,"name":"new ValidationController","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":66,"name":"validator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Validator","id":27}}],"type":{"type":"reference","name":"ValidationController","id":52}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":189,"character":33}]},{"id":55,"name":"bindings","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":169,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":60,"name":"elements","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":183,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":58,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Validation errors that have been rendered by the controller."},"sources":[{"fileName":"aurelia-validation.d.ts","line":178,"character":14}],"type":{"type":"reference","isArray":true,"name":"ValidateResult","id":2}},{"id":63,"name":"finishValidating","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":189,"character":32}],"type":{"type":"instrinct","name":"any"}},{"id":61,"name":"objects","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":184,"character":23}],"type":{"type":"instrinct","name":"any"}},{"id":56,"name":"renderers","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":170,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":57,"name":"results","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"comment":{"shortText":"Validation results that have been rendered by the controller."},"sources":[{"fileName":"aurelia-validation.d.ts","line":174,"character":23}],"type":{"type":"instrinct","name":"any"}},{"id":62,"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":188,"character":23}],"type":{"type":"instrinct","name":"number"}},{"id":59,"name":"validating","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":" Whether the controller is currently validating."},"sources":[{"fileName":"aurelia-validation.d.ts","line":182,"character":18}],"type":{"type":"instrinct","name":"boolean"}},{"id":53,"name":"validator","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":167,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":54,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":168,"character":21}],"type":{"type":"reference","isArray":true,"name":"Validator","id":27}},{"id":74,"name":"addError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":75,"name":"addError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds and renders an error."},"parameters":[{"id":76,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}},{"id":77,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":78,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"type":{"type":"reference","name":"ValidateResult","id":2}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":205,"character":16}]},{"id":67,"name":"addObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":68,"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":69,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object."},"type":{"type":"instrinct","name":"any"}},{"id":70,"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":196,"character":17}]},{"id":82,"name":"addRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":83,"name":"addRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a renderer."},"parameters":[{"id":84,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":48}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":214,"character":19}]},{"id":105,"name":"getAssociatedElements","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":106,"name":"getAssociatedElements","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the elements associated with an object and propertyName (if any)."},"parameters":[{"id":107,"name":"__namedParameters","kind":32768,"kindString":"Parameter","flags":{},"originalName":"__0","type":{"type":"reflection","declaration":{"id":108,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":109,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":252,"character":45}],"type":{"type":"instrinct","name":"any"}},{"id":110,"name":"propertyName","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":252,"character":59}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Variables","kind":32,"children":[109,110]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":252,"character":38}]}}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":252,"character":37}]},{"id":96,"name":"getInstructionPredicate","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":97,"name":"getInstructionPredicate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Interprets the instruction and returns a predicate that will identify\nrelevant results in the list of rendered validation results."},"parameters":[{"id":98,"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":236,"character":39}]},{"id":111,"name":"processResultDelta","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":112,"name":"processResultDelta","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":113,"name":"kind","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":114,"name":"oldResults","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":115,"name":"newResults","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":253,"character":34}]},{"id":88,"name":"registerBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":89,"name":"registerBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Registers a binding with the controller."},"parameters":[{"id":90,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The binding instance."},"type":{"type":"reference","name":"Binding"}},{"id":91,"name":"target","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The DOM element."},"type":{"type":"reference","name":"Element"}},{"id":92,"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":226,"character":23}]},{"id":79,"name":"removeError","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":80,"name":"removeError","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes and unrenders an error."},"parameters":[{"id":81,"name":"result","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidateResult","id":2}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":209,"character":19}]},{"id":71,"name":"removeObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":72,"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":73,"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":201,"character":20}]},{"id":85,"name":"removeRenderer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":86,"name":"removeRenderer","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes a renderer."},"parameters":[{"id":87,"name":"renderer","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The renderer.\n"},"type":{"type":"reference","name":"ValidationRenderer","id":48}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":219,"character":22}]},{"id":102,"name":"reset","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":103,"name":"reset","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets any rendered validation results (unrenders)."},"parameters":[{"id":104,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Optional. Instructions on what to reset. If unspecified all rendered results\nwill be unrendered.\n"},"type":{"type":"reference","name":"ValidateInstruction","id":19}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":248,"character":13}]},{"id":119,"name":"resetBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":120,"name":"resetBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Resets the results for a property associated with a binding."},"parameters":[{"id":121,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":261,"character":20}]},{"id":93,"name":"unregisterBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":94,"name":"unregisterBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Unregisters a binding with the controller."},"parameters":[{"id":95,"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":231,"character":25}]},{"id":99,"name":"validate","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":100,"name":"validate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates and renders results."},"parameters":[{"id":101,"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":19}}],"type":{"type":"reference","name":"Promise","typeArguments":[{"type":"reference","name":"ControllerValidateResult","id":23}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":242,"character":16}]},{"id":116,"name":"validateBinding","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":117,"name":"validateBinding","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the property associated with a binding."},"parameters":[{"id":118,"name":"binding","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Binding"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":257,"character":23}]}],"groups":[{"title":"Constructors","kind":512,"children":[64]},{"title":"Properties","kind":1024,"children":[55,60,58,63,61,56,57,62,59,53,54]},{"title":"Methods","kind":2048,"children":[74,67,82,105,96,111,88,79,71,85,102,119,93,99,116]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":166,"character":37}]},{"id":244,"name":"ValidationControllerFactory","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Creates ValidationController instances."},"children":[{"id":249,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":250,"name":"new ValidationControllerFactory","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":251,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":244}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":337,"character":70}]},{"id":245,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":336,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":252,"name":"create","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":253,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Creates a new controller instance."},"parameters":[{"id":254,"name":"validator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Validator","id":27}}],"type":{"type":"reference","name":"ValidationController","id":52}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":342,"character":14}]},{"id":255,"name":"createForCurrentScope","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":256,"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":257,"name":"validator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","name":"Validator","id":27}}],"type":{"type":"reference","name":"ValidationController","id":52}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":347,"character":29}]},{"id":246,"name":"get","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":247,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":248,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"ValidationControllerFactory","id":244}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":337,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[249]},{"title":"Properties","kind":1024,"children":[245]},{"title":"Methods","kind":2048,"children":[252,255,246]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":335,"character":44}]},{"id":261,"name":"ValidationErrorsCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":271,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":272,"name":"new ValidationErrorsCustomAttribute","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":273,"name":"boundaryElement","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":274,"name":"controllerAccessor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":275,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":276,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"reference","name":"ValidationController","id":52}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":366,"character":65}]}}}],"type":{"type":"reference","name":"ValidationErrorsCustomAttribute","id":261}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":365,"character":32}]},{"id":262,"name":"boundaryElement","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":358,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":263,"name":"controllerAccessor","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":359,"character":34}],"type":{"type":"instrinct","name":"any"}},{"id":270,"name":"errors","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":365,"character":14}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":258}},{"id":269,"name":"value","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":364,"character":13}],"type":{"type":"reference","isArray":true,"name":"RenderedError","id":258}},{"id":264,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":360,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reflection","declaration":{"id":265,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":266,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":267,"name":"new __type","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"__type","id":265}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":360,"character":25}]},{"id":268,"name":"prototype","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":362,"character":21}],"type":{"type":"reference","name":"Element"}}],"groups":[{"title":"Constructors","kind":512,"children":[266]},{"title":"Variables","kind":32,"children":[268]}]}},{"type":"reference","name":"Lazy"}]}},{"id":285,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":286,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":372,"character":12}]},{"id":279,"name":"interestingElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":280,"name":"interestingElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":281,"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":370,"character":27}]},{"id":282,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":283,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":284,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"RenderInstruction","id":44}}],"type":{"type":"instrinct","name":"void"},"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":50}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":371,"character":14}],"implementationOf":{"type":"reference","name":"ValidationRenderer.render","id":49}},{"id":277,"name":"sort","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":278,"name":"sort","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":369,"character":12}]},{"id":287,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":288,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":373,"character":14}]}],"groups":[{"title":"Constructors","kind":512,"children":[271]},{"title":"Properties","kind":1024,"children":[262,263,270,269,264]},{"title":"Methods","kind":2048,"children":[285,279,282,277,287]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":357,"character":48}],"implementedTypes":[{"type":"reference","name":"ValidationRenderer","id":48}]},{"id":380,"name":"ValidationMessageProvider","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Retrieves validation messages and property display names."},"children":[{"id":383,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":384,"name":"new ValidationMessageProvider","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":385,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":339}}],"type":{"type":"reference","name":"ValidationMessageProvider","id":380}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":478,"character":49}]},{"id":381,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":477,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":382,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":478,"character":21}],"type":{"type":"reference","isArray":true,"name":"ValidationParser","id":339}},{"id":389,"name":"getDisplayName","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":390,"name":"getDisplayName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Formulates a property display name using the property name and the configured\ndisplayName (if provided).\nOverride this with your own custom logic."},"parameters":[{"id":391,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The property name.\n"},"type":{"type":"instrinct","name":"string"}},{"id":392,"name":"displayName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"},{"type":"instrinct","name":"undefined"}]}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":491,"character":22}]},{"id":386,"name":"getMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":387,"name":"getMessage","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns a message binding expression that corresponds to the key."},"parameters":[{"id":388,"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":484,"character":18}]}],"groups":[{"title":"Constructors","kind":512,"children":[383]},{"title":"Properties","kind":1024,"children":[381,382]},{"title":"Methods","kind":2048,"children":[389,386]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":476,"character":42}]},{"id":339,"name":"ValidationParser","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":347,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":348,"name":"new ValidationParser","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":349,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Parser"}},{"id":350,"name":"bindinqLanguage","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"BindingLanguage"}}],"type":{"type":"reference","name":"ValidationParser","id":339}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":451,"character":22}]},{"id":341,"name":"bindinqLanguage","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":446,"character":31}],"type":{"type":"instrinct","name":"any"}},{"id":346,"name":"cache","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":451,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":343,"name":"emptyStringExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":448,"character":37}],"type":{"type":"instrinct","name":"any"}},{"id":344,"name":"nullExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":449,"character":30}],"type":{"type":"instrinct","name":"any"}},{"id":340,"name":"parser","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":445,"character":22}],"type":{"type":"instrinct","name":"any"}},{"id":345,"name":"undefinedExpression","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":450,"character":35}],"type":{"type":"instrinct","name":"any"}},{"id":342,"name":"inject","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":447,"character":21}],"type":{"type":"union","isArray":true,"types":[{"type":"reference","name":"Parser"},{"type":"reference","name":"BindingLanguage"}]}},{"id":359,"name":"coalesce","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":360,"name":"coalesce","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":361,"name":"part","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":455,"character":24}]},{"id":362,"name":"getAccessorExpression","kind":2048,"kindString":"Method","flags":{"isPrivate":true,"isExported":true},"signatures":[{"id":363,"name":"getAccessorExpression","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":364,"name":"fn","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":456,"character":37}]},{"id":351,"name":"parseMessage","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":352,"name":"parseMessage","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":353,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"reference","name":"Expression"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":453,"character":20}]},{"id":354,"name":"parseProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":355,"name":"parseProperty","kind":4096,"kindString":"Call signature","flags":{},"typeParameter":[{"id":356,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":357,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":358,"name":"property","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"reference","name":"PropertyAccessor","id":334,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"RuleProperty","id":301}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":454,"character":21}]}],"groups":[{"title":"Constructors","kind":512,"children":[347]},{"title":"Properties","kind":1024,"children":[341,346,343,344,340,345,342]},{"title":"Methods","kind":2048,"children":[359,362,351,354]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":444,"character":33}]},{"id":289,"name":"ValidationRendererCustomAttribute","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":290,"name":"container","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":377,"character":25}],"type":{"type":"instrinct","name":"any"}},{"id":291,"name":"controller","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":378,"character":26}],"type":{"type":"instrinct","name":"any"}},{"id":293,"name":"renderer","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":380,"character":24}],"type":{"type":"instrinct","name":"any"}},{"id":292,"name":"value","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":379,"character":21}],"type":{"type":"instrinct","name":"any"}},{"id":297,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":298,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":382,"character":12}]},{"id":294,"name":"created","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":295,"name":"created","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":296,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":381,"character":15}]},{"id":299,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":300,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":383,"character":14}]}],"groups":[{"title":"Properties","kind":1024,"children":[290,291,293,292]},{"title":"Methods","kind":2048,"children":[297,294,299]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":376,"character":50}]},{"id":600,"name":"ValidationRules","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Fluent rule definition API."},"children":[{"id":601,"name":"parser","kind":1024,"kindString":"Property","flags":{"isStatic":true,"isPrivate":true,"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":758,"character":29}],"type":{"type":"instrinct","name":"any"}},{"id":613,"name":"customRule","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":614,"name":"customRule","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Defines a custom rule."},"parameters":[{"id":615,"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":616,"name":"condition","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rule function."},"type":{"type":"reflection","declaration":{"id":617,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":618,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":619,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}},{"id":620,"name":"object","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":621,"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":777,"character":50}]}}},{"id":622,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The message expression"},"type":{"type":"instrinct","name":"string"}},{"id":623,"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":624,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":625,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":626,"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":777,"character":156}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":777,"character":25}]},{"id":605,"name":"ensure","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":606,"name":"ensure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Target a property with validation rules."},"typeParameter":[{"id":607,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":608,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":609,"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":334,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}]}}],"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TValue"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":764,"character":21}]},{"id":610,"name":"ensureObject","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":611,"name":"ensureObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Targets an object with validation rules."},"typeParameter":[{"id":612,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reference","name":"FluentRules","id":515,"typeArguments":[{"type":"typeParameter","name":"TObject"},{"type":"typeParameter","name":"TObject"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":768,"character":27}]},{"id":602,"name":"initialize","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":603,"name":"initialize","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":604,"name":"parser","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ValidationParser","id":339}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":759,"character":25}]},{"id":631,"name":"off","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":632,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes the rules from a class or object."},"parameters":[{"id":633,"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":788,"character":18}]},{"id":627,"name":"taggedRules","kind":2048,"kindString":"Method","flags":{"isStatic":true,"isExported":true},"signatures":[{"id":628,"name":"taggedRules","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns rules with the matching tag."},"parameters":[{"id":629,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"reference","isArray":true,"name":"Rule","id":304,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}},{"id":630,"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":304,"typeArguments":[{"type":"instrinct","name":"any"},{"type":"instrinct","name":"any"}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":783,"character":26}]}],"groups":[{"title":"Properties","kind":1024,"children":[601]},{"title":"Methods","kind":2048,"children":[613,605,610,602,631,627]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":757,"character":32}]},{"id":27,"name":"Validator","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"Validates objects and properties."},"children":[{"id":37,"name":"ruleExists","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":38,"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":39,"name":"rules","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The rules to search."},"type":{"type":"instrinct","name":"any"}},{"id":40,"name":"rule","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":101,"character":27}]},{"id":33,"name":"validateObject","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":34,"name":"validateObject","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates all rules for specified object and it's properties."},"parameters":[{"id":35,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":36,"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":"ValidateResult","id":2}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":95,"character":31}]},{"id":28,"name":"validateProperty","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":29,"name":"validateProperty","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Validates the specified property."},"parameters":[{"id":30,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The object to validate."},"type":{"type":"instrinct","name":"any"}},{"id":31,"name":"propertyName","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The name of the property to validate."},"type":{"type":"instrinct","name":"string"}},{"id":32,"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":"ValidateResult","id":2}]}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":88,"character":33}]}],"groups":[{"title":"Methods","kind":2048,"children":[37,33,28]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":80,"character":35}],"extendedBy":[{"type":"reference","name":"StandardValidator","id":393}]},{"id":23,"name":"ControllerValidateResult","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"The result of a call to the validation controller's validate method."},"children":[{"id":26,"name":"instruction","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"comment":{"shortText":"The instruction passed to the controller's validate method."},"sources":[{"fileName":"aurelia-validation.d.ts","line":64,"character":19}],"type":{"type":"reference","name":"ValidateInstruction","id":19}},{"id":25,"name":"results","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The validation result of every rule that was evaluated."},"sources":[{"fileName":"aurelia-validation.d.ts","line":60,"character":15}],"type":{"type":"reference","isArray":true,"name":"ValidateResult","id":2}},{"id":24,"name":"valid","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"Whether validation passed."},"sources":[{"fileName":"aurelia-validation.d.ts","line":56,"character":13}],"type":{"type":"instrinct","name":"boolean"}}],"groups":[{"title":"Properties","kind":1024,"children":[26,25,24]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":52,"character":45}]},{"id":334,"name":"PropertyAccessor","kind":256,"kindString":"Interface","flags":{"isExported":true},"typeParameter":[{"id":335,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":336,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"signatures":[{"id":337,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":338,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"typeParameter","name":"TValue"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":441,"character":37}]},{"id":44,"name":"RenderInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Defines which validation results to render and which validation results to unrender."},"children":[{"id":45,"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":134,"character":12}],"type":{"type":"union","types":[{"type":"stringLiteral","value":"validate"},{"type":"stringLiteral","value":"reset"}]}},{"id":46,"name":"render","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The results to render."},"sources":[{"fileName":"aurelia-validation.d.ts","line":138,"character":14}],"type":{"type":"reference","isArray":true,"name":"ResultInstruction","id":41}},{"id":47,"name":"unrender","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The results to unrender."},"sources":[{"fileName":"aurelia-validation.d.ts","line":142,"character":16}],"type":{"type":"reference","isArray":true,"name":"ResultInstruction","id":41}}],"groups":[{"title":"Properties","kind":1024,"children":[45,46,47]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":130,"character":38}]},{"id":258,"name":"RenderedError","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":259,"name":"error","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":354,"character":13}],"type":{"type":"reference","name":"ValidateResult","id":2}},{"id":260,"name":"targets","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":355,"character":15}],"type":{"type":"reference","isArray":true,"name":"Element"}}],"groups":[{"title":"Properties","kind":1024,"children":[259,260]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":353,"character":34}]},{"id":41,"name":"ResultInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"A result to render (or unrender) and the associated elements (if any)"},"children":[{"id":43,"name":"elements","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The associated elements (if any)."},"sources":[{"fileName":"aurelia-validation.d.ts","line":125,"character":16}],"type":{"type":"reference","isArray":true,"name":"Element"}},{"id":42,"name":"result","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The validation result."},"sources":[{"fileName":"aurelia-validation.d.ts","line":121,"character":14}],"type":{"type":"reference","name":"ValidateResult","id":2}}],"groups":[{"title":"Properties","kind":1024,"children":[43,42]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":117,"character":38}]},{"id":304,"name":"Rule","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"A rule definition. Associations a rule with a property or object."},"typeParameter":[{"id":305,"name":"TObject","kind":131072,"kindString":"Type parameter","flags":{}},{"id":306,"name":"TValue","kind":131072,"kindString":"Type parameter","flags":{}}],"children":[{"id":308,"name":"condition","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":404,"character":17}],"type":{"type":"reflection","declaration":{"id":309,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":310,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":311,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TValue"}},{"id":312,"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":404,"character":18}]}}},{"id":313,"name":"config","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":405,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":319,"name":"message","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":410,"character":15}],"type":{"type":"union","types":[{"type":"reference","name":"Expression"},{"type":"instrinct","name":"null"}]}},{"id":318,"name":"messageKey","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":409,"character":18}],"type":{"type":"instrinct","name":"string"}},{"id":307,"name":"property","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":403,"character":16}],"type":{"type":"reference","name":"RuleProperty","id":301}},{"id":320,"name":"sequence","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":411,"character":16}],"type":{"type":"instrinct","name":"number"}},{"id":321,"name":"tag","kind":1024,"kindString":"Property","flags":{"isExported":true,"isOptional":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":412,"character":11}],"type":{"type":"instrinct","name":"string"}},{"id":314,"name":"when","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-validation.d.ts","line":406,"character":12}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":315,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":316,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":317,"name":"object","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"typeParameter","name":"TObject"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":406,"character":13}]}},{"type":"instrinct","name":"null"}]}}],"groups":[{"title":"Properties","kind":1024,"children":[308,313,319,318,307,320,321,314]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":402,"character":25}]},{"id":301,"name":"RuleProperty","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Information related to a property that is the subject of validation."},"children":[{"id":303,"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":397,"character":19}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}},{"id":302,"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":393,"character":12}],"type":{"type":"union","types":[{"type":"instrinct","name":"string"},{"type":"instrinct","name":"null"}]}}],"groups":[{"title":"Properties","kind":1024,"children":[303,302]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":389,"character":33}]},{"id":19,"name":"ValidateInstruction","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Instructions for the validation controller's validate method."},"children":[{"id":20,"name":"object","kind":1024,"kindString":"Property","flags":{"isExported":true},"comment":{"shortText":"The object to validate."},"sources":[{"fileName":"aurelia-validation.d.ts","line":37,"character":14}],"type":{"type":"instrinct","name":"any"}},{"id":21,"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":41,"character":20}],"type":{"type":"instrinct","name":"any"}},{"id":22,"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":45,"character":13}],"type":{"type":"instrinct","name":"any"}}],"groups":[{"title":"Properties","kind":1024,"children":[20,21,22]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":33,"character":40}]},{"id":377,"name":"ValidationMessages","kind":256,"kindString":"Interface","flags":{"isExported":true},"indexSignature":[{"id":378,"name":"__index","kind":8192,"kindString":"Index signature","flags":{},"parameters":[{"id":379,"name":"key","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"string"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":466,"character":39}]},{"id":48,"name":"ValidationRenderer","kind":256,"kindString":"Interface","flags":{"isExported":true},"comment":{"shortText":"Renders validation results."},"children":[{"id":49,"name":"render","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":50,"name":"render","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Render the validation results."},"parameters":[{"id":51,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The render instruction. Defines which results to render and which\nresults to unrender.\n"},"type":{"type":"reference","name":"RenderInstruction","id":44}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":153,"character":14}]}],"groups":[{"title":"Methods","kind":2048,"children":[49]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":147,"character":39}],"implementedBy":[{"type":"reference","name":"ValidationErrorsCustomAttribute","id":261}]},{"id":653,"name":"validateTrigger","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Validation triggers."},"sources":[{"fileName":"aurelia-validation.d.ts","line":107,"character":32}],"type":{"type":"reflection","declaration":{"id":654,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":656,"name":"blur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":109,"character":12}],"type":{"type":"instrinct","name":"number"}},{"id":657,"name":"change","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":110,"character":14}],"type":{"type":"instrinct","name":"number"}},{"id":658,"name":"changeOrBlur","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":111,"character":20}],"type":{"type":"instrinct","name":"number"}},{"id":655,"name":"manual","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":108,"character":14}],"type":{"type":"instrinct","name":"number"}}],"groups":[{"title":"Variables","kind":32,"children":[656,657,658,655]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":107,"character":33}]}}},{"id":662,"name":"validationMessages","kind":32,"kindString":"Variable","flags":{"isExported":true},"comment":{"shortText":"Dictionary of validation messages. [messageKey]: messageExpression"},"sources":[{"fileName":"aurelia-validation.d.ts","line":472,"character":35}],"type":{"type":"reference","name":"ValidationMessages","id":377}},{"id":663,"name":"configure","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":664,"name":"configure","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Configures the plugin."},"parameters":[{"id":665,"name":"frameworkConfig","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":666,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":667,"name":"container","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":830,"character":17}],"type":{"type":"reference","name":"Container"}},{"id":668,"name":"globalResources","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":831,"character":23}],"type":{"type":"reflection","declaration":{"id":669,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":670,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":671,"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":831,"character":24}]}}}],"groups":[{"title":"Variables","kind":32,"children":[667,668]}],"sources":[{"fileName":"aurelia-validation.d.ts","line":829,"character":46}]}}},{"id":672,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":673,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":674,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":675,"name":"config","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"AureliaValidationConfiguration","id":634}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":832,"character":17}]}}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":829,"character":29}]},{"id":646,"name":"getPropertyInfo","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":647,"name":"getPropertyInfo","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Retrieves the object and property name for the specified expression."},"parameters":[{"id":648,"name":"expression","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The expression"},"type":{"type":"reference","name":"Expression"}},{"id":649,"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":650,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":651,"name":"object","kind":32,"kindString":"Variable","flags":{},"sources":[{"fileName":"aurelia-validation.d.ts","line":73,"character":14}],"type":{"type":"reference","name":"Object"}},{"id":652,"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":[651,652]}],"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":659,"name":"isString","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":660,"name":"isString","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":661,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-validation.d.ts","line":437,"character":28}]}],"groups":[{"title":"Classes","kind":128,"children":[634,579,432,515,365,322,393,143,122,164,184,204,224,2,52,244,261,380,339,289,600,27]},{"title":"Interfaces","kind":256,"children":[23,334,44,258,41,304,301,19,377,48]},{"title":"Variables","kind":32,"children":[653,662]},{"title":"Functions","kind":64,"children":[663,646,659]}]} diff --git a/package.json b/package.json index 4add8fcb..e73b0220 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-validation", - "version": "1.0.0-beta.1.0.0", + "version": "1.0.0-beta.1.0.1", "description": "Validation for Aurelia applications", "keywords": [ "aurelia",