当前位置: 首页>>代码示例>>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;未经允许,请勿转载。