How to use the aurelia-validation.ValidationRules.off function in aurelia-validation

To help you get started, we’ve selected a few aurelia-validation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github process-engine / bpmn-studio / src / modules / solution-explorer / solution-explorer-solution / solution-explorer-solution.ts View on Github external
private resetDiagramRenaming(): void {
    // Remove all used event listeners.
    document.removeEventListener('click', this.onRenameDiagramClickEvent);
    document.removeEventListener('keyup', this.onRenameDiagramKeyupEvent);

    // Reset input field.
    this.diagramRenamingState.currentDiagramInputValue = '';
    this.renameDiagramInput.value = '';
    // Hide input field.
    this.currentlyRenamingDiagram = null;

    ValidationRules.off(this.diagramRenamingState);
  }
github process-engine / bpmn-studio / src / modules / solution-explorer / solution-explorer-solution / solution-explorer-solution.ts View on Github external
private resetDiagramCreation(): void {
    // Remove all used event listeners.
    document.removeEventListener('click', this.onCreateNewDiagramClickEvent);
    document.removeEventListener('keyup', this.onCreateNewDiagramKeyupEvent);

    // Reset input field.
    this.diagramCreationState.currentDiagramInputValue = '';
    this.createNewDiagramInput.value = '';
    // Hide input field.
    this.diagramCreationState.isCreateDiagramInputShown = false;

    ValidationRules.off(this.diagramCreationState);
  }
github process-engine / bpmn-studio / src / modules / process-solution-panel / process-solution-panel.ts View on Github external
private _resetDiagramCreation(solution: IViewModelSolution): void {
    // Remove all used event listeners.
    solution.documentEventHandlers.forEach((eventHandler: (event: any) => any, eventName: string): void => {
      document.removeEventListener(eventName, eventHandler);
    });
    solution.documentEventHandlers = new Map();

    // Reset input field.
    solution.currentDiagramInputValue = '';
    solution.createNewDiagramInput.value = '';
    // Hide input field.
    solution.isCreateDiagramInputShown = false;

    ValidationRules.off(solution);
  }