當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript aurelia-validation.ValidationController類代碼示例

本文整理匯總了TypeScript中aurelia-validation.ValidationController的典型用法代碼示例。如果您正苦於以下問題:TypeScript ValidationController類的具體用法?TypeScript ValidationController怎麽用?TypeScript ValidationController使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ValidationController類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

 constructor(private router: Router, private storage: Storage, private validator: Validator, controllerFactory: ValidationControllerFactory) {
     this.controller = controllerFactory.createForCurrentScope(validator);
     this.controller.validateTrigger = validateTrigger.changeOrBlur;
     this.controller.subscribe(event => this.validateWhole());
 }
開發者ID:Jenselme,項目名稱:tests-ionic2-and-aurelia-framework7,代碼行數:5,代碼來源:edit.ts

示例2: saveProfile

 saveProfile()
 {
     this.controller.reset()
     if ( String(this.user.newPass) === String(this.user.repeatPass) && String(this.user.newPass) )
     {
         this.connect.createProfile( this.user )
         .then(
             (data: any) =>
             {
                 if ( data.response === 'done' )
                 {
                     this.updateData();
                     this.aurelia.setRoot('app');
                 }
                 else
                 {
                     console.log( data )
                 }
             }
         );
     }
     else
     {
         this.controller.addError('New password doen\'t match.', 'password')
         console.log( 'new password doen\'t match' )
     }
 }
開發者ID:yordan-milkov,項目名稱:TaskBo-rd,代碼行數:27,代碼來源:register.ts

示例3: save

  async save() {
    if (this.validation.validate().length > 0) {
      alert('There are validation errors');
      return;
    }

    await this.state._save();
    alert('Changes saved');
  }
開發者ID:charlespockert,項目名稱:monterey,代碼行數:9,代碼來源:screen.ts

示例4: save

    save() {
        this.validation.validate()
            .then(result => {
                if (result.valid) {
                    this.apiClient.updatePump(this.pump);
                    //this.notify.info('Sump Pump Details Saved');
                } else {

                }
            })
    }
開發者ID:NickSchweitzer,項目名稱:SumpPumpMonitor,代碼行數:11,代碼來源:pumpedit.ts

示例5: submit

  submit() {
    if (this.validation.validate().length > 0) {
      alert('There are validation errors');
      return;
    }

    this.state.gitAuthorization = btoa(`${this.username}:${this.password}`);

    this.state._save();

    this.dialog.ok();
  }
開發者ID:charlespockert,項目名稱:monterey,代碼行數:12,代碼來源:github-creds.ts

示例6: validateOnRender

 validateOnRender() {
   if (this.options.validateOnRender) {
     this.logger.info('schemaform-attached:validate');
     this.validationController.validate();
   }
 }
開發者ID:jbockle,項目名稱:aurelia-json-schema-form,代碼行數:6,代碼來源:form-controller.ts


注:本文中的aurelia-validation.ValidationController類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。