aurelia-validation
Advanced tools
Comparing version 0.12.1 to 0.12.2
{ | ||
"name": "aurelia-validation", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"description": "Validation for Aurelia applications", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
define(["require", "exports"], function (require, exports) { | ||
"use strict"; | ||
function isString(value) { | ||
return toString.call(value) === '[object String]'; | ||
return Object.prototype.toString.call(value) === '[object String]'; | ||
} | ||
exports.isString = isString; | ||
}); |
@@ -63,3 +63,3 @@ import { Rule, RuleProperty } from './rule'; | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -132,3 +132,3 @@ * Applies the "required" rule to the property. | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -135,0 +135,0 @@ * Applies the "required" rule to the property. |
@@ -276,2 +276,5 @@ define(["require", "exports", './validator', './validate-trigger', './property-info', './validation-error'], function (require, exports, validator_1, validate_trigger_1, property_info_1, validation_error_1) { | ||
ValidationController.prototype.validateBinding = function (binding) { | ||
if (!binding.isBound) { | ||
return; | ||
} | ||
var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; | ||
@@ -278,0 +281,0 @@ var registeredBinding = this.bindings.get(binding); |
"use strict"; | ||
function isString(value) { | ||
return toString.call(value) === '[object String]'; | ||
return Object.prototype.toString.call(value) === '[object String]'; | ||
} | ||
exports.isString = isString; |
@@ -63,3 +63,3 @@ import { Rule, RuleProperty } from './rule'; | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -132,3 +132,3 @@ * Applies the "required" rule to the property. | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -135,0 +135,0 @@ * Applies the "required" rule to the property. |
@@ -279,2 +279,5 @@ "use strict"; | ||
ValidationController.prototype.validateBinding = function (binding) { | ||
if (!binding.isBound) { | ||
return; | ||
} | ||
var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; | ||
@@ -281,0 +284,0 @@ var registeredBinding = this.bindings.get(binding); |
export function isString(value) { | ||
return toString.call(value) === '[object String]'; | ||
return Object.prototype.toString.call(value) === '[object String]'; | ||
} |
@@ -63,3 +63,3 @@ import { Rule, RuleProperty } from './rule'; | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -132,3 +132,3 @@ * Applies the "required" rule to the property. | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -135,0 +135,0 @@ * Applies the "required" rule to the property. |
@@ -264,2 +264,5 @@ import { Validator } from './validator'; | ||
validateBinding(binding) { | ||
if (!binding.isBound) { | ||
return; | ||
} | ||
const { object, propertyName } = getPropertyInfo(binding.sourceExpression, binding.source); | ||
@@ -266,0 +269,0 @@ const registeredBinding = this.bindings.get(binding); |
export function isString(value) { | ||
return toString.call(value) === '[object String]'; | ||
return Object.prototype.toString.call(value) === '[object String]'; | ||
} |
@@ -63,3 +63,3 @@ import { Rule, RuleProperty } from './rule'; | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -132,3 +132,3 @@ * Applies the "required" rule to the property. | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -135,0 +135,0 @@ * Applies the "required" rule to the property. |
@@ -278,2 +278,5 @@ import { Validator } from './validator'; | ||
ValidationController.prototype.validateBinding = function (binding) { | ||
if (!binding.isBound) { | ||
return; | ||
} | ||
var _a = getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; | ||
@@ -280,0 +283,0 @@ var registeredBinding = this.bindings.get(binding); |
@@ -5,3 +5,3 @@ System.register([], function(exports_1, context_1) { | ||
function isString(value) { | ||
return toString.call(value) === '[object String]'; | ||
return Object.prototype.toString.call(value) === '[object String]'; | ||
} | ||
@@ -8,0 +8,0 @@ exports_1("isString", isString); |
@@ -63,3 +63,3 @@ import { Rule, RuleProperty } from './rule'; | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -132,3 +132,3 @@ * Applies the "required" rule to the property. | ||
*/ | ||
satisfiesRule(name: string, ...args: any[]): any; | ||
satisfiesRule(name: string, ...args: any[]): FluentRuleCustomizer<TObject, TValue>; | ||
/** | ||
@@ -135,0 +135,0 @@ * Applies the "required" rule to the property. |
@@ -294,2 +294,5 @@ System.register(['./validator', './validate-trigger', './property-info', './validation-error'], function(exports_1, context_1) { | ||
ValidationController.prototype.validateBinding = function (binding) { | ||
if (!binding.isBound) { | ||
return; | ||
} | ||
var _a = property_info_1.getPropertyInfo(binding.sourceExpression, binding.source), object = _a.object, propertyName = _a.propertyName; | ||
@@ -296,0 +299,0 @@ var registeredBinding = this.bindings.get(binding); |
@@ -212,3 +212,3 @@ --- | ||
const translation = i18next.t(key); | ||
return this.standardGetMessage(translation); | ||
return this.parser.parseMessage(translation); | ||
}; | ||
@@ -501,2 +501,6 @@ </source-code> | ||
> Warning | ||
> The renderer example uses `Element.closest`. You'll need to [polyfill](https://github.com/jonathantneal/closest) this method in Internet Explorer. | ||
## [Entity Validation](aurelia-doc://section/8/version/1.0.0) | ||
@@ -503,0 +507,0 @@ |
{ | ||
"name": "aurelia-validation", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"description": "Validation for Aurelia applications", | ||
@@ -41,2 +41,4 @@ "keywords": [ | ||
"aurelia-binding": "^1.0.1", | ||
"aurelia-dependency-injection": "^1.0.0", | ||
"aurelia-task-queue": "^1.0.0", | ||
"aurelia-templating": "^1.0.0" | ||
@@ -46,10 +48,12 @@ }, | ||
"aurelia-binding": "^1.0.1", | ||
"aurelia-dependency-injection": "^1.0.0", | ||
"aurelia-task-queue": "^1.0.0", | ||
"aurelia-templating": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
} | ||
"devDependencies": {} | ||
}, | ||
"dependencies": { | ||
"aurelia-binding": "^1.0.1", | ||
"aurelia-dependency-injection": "^1.0.0", | ||
"aurelia-task-queue": "^1.0.0", | ||
"aurelia-templating": "^1.0.0" | ||
@@ -64,2 +68,9 @@ }, | ||
"aurelia": { | ||
"build": { | ||
"resources": [ | ||
"validate-binding-behavior", | ||
"validation-errors-custom-attribute", | ||
"validation-renderer-custom-attribute" | ||
] | ||
}, | ||
"documentation": { | ||
@@ -66,0 +77,0 @@ "articles": [ |
export function isString(value: any): boolean { | ||
return toString.call(value) === '[object String]'; | ||
return Object.prototype.toString.call(value) === '[object String]'; | ||
} |
@@ -226,3 +226,3 @@ import {Rule, RuleProperty} from './rule'; | ||
if (rule instanceof Function) { | ||
return rule.call(this, ...args); | ||
return <FluentRuleCustomizer<TObject, TValue>>rule.call(this, ...args); | ||
} | ||
@@ -229,0 +229,0 @@ throw new Error(`Rule with name "${name}" does not exist.`); |
@@ -332,2 +332,5 @@ import {Binding, Expression} from 'aurelia-binding'; | ||
validateBinding(binding: Binding) { | ||
if (!binding.isBound) { | ||
return; | ||
} | ||
const { object, propertyName } = getPropertyInfo(<Expression>binding.sourceExpression, (<any>binding).source); | ||
@@ -334,0 +337,0 @@ const registeredBinding = this.bindings.get(binding); |
Sorry, the diff of this file is too big to display
616846
12015
4