Skip to content

Commit

Permalink
fix(BindingBehaviors): add explicit name
Browse files Browse the repository at this point in the history
  • Loading branch information
bigopon authored and jdanyow committed Sep 29, 2018
1 parent 075b0a5 commit 59e3f1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/aurelia-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class AureliaValidationConfiguration {
*/
export function configure(
// tslint:disable-next-line:ban-types
frameworkConfig: { container: Container, globalResources?: (...resources: Function[]) => any },
frameworkConfig: { container: Container, globalResources?: (...resources: any[]) => any },
callback?: (config: AureliaValidationConfiguration) => void
) {
// the fluent rule definition API needs the parser to translate messages
Expand Down
6 changes: 6 additions & 0 deletions src/validate-binding-behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { TaskQueue } from 'aurelia-task-queue';
import { ValidationController } from './validation-controller';
import { validateTrigger } from './validate-trigger';
import { ValidateBindingBehaviorBase } from './validate-binding-behavior-base';
import { bindingBehavior } from 'aurelia-binding';

/**
* Binding behavior. Indicates the bound property should be validated
* when the validate trigger specified by the associated controller's
* validateTrigger property occurs.
*/
@bindingBehavior('validate')
export class ValidateBindingBehavior extends ValidateBindingBehaviorBase {
public static inject = [TaskQueue];

Expand All @@ -21,6 +23,7 @@ export class ValidateBindingBehavior extends ValidateBindingBehaviorBase {
* manually, by calling controller.validate(). No automatic validation
* triggered by data-entry or blur will occur.
*/
@bindingBehavior('validateManually')
export class ValidateManuallyBindingBehavior extends ValidateBindingBehaviorBase {
public static inject = [TaskQueue];

Expand All @@ -33,6 +36,7 @@ export class ValidateManuallyBindingBehavior extends ValidateBindingBehaviorBase
* Binding behavior. Indicates the bound property should be validated
* when the associated element blurs.
*/
@bindingBehavior('validateOnBlur')
export class ValidateOnBlurBindingBehavior extends ValidateBindingBehaviorBase {
public static inject = [TaskQueue];

Expand All @@ -46,6 +50,7 @@ export class ValidateOnBlurBindingBehavior extends ValidateBindingBehaviorBase {
* when the associated element is changed by the user, causing a change
* to the model.
*/
@bindingBehavior('validateOnChange')
export class ValidateOnChangeBindingBehavior extends ValidateBindingBehaviorBase {
public static inject = [TaskQueue];

Expand All @@ -59,6 +64,7 @@ export class ValidateOnChangeBindingBehavior extends ValidateBindingBehaviorBase
* when the associated element blurs or is changed by the user, causing
* a change to the model.
*/
@bindingBehavior('validateOnChangeOrBlur')
export class ValidateOnChangeOrBlurBindingBehavior extends ValidateBindingBehaviorBase {
public static inject = [TaskQueue];

Expand Down

0 comments on commit 59e3f1c

Please sign in to comment.