当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript new_validatable_mixin.ValidatableMixin类代码示例

本文整理汇总了TypeScript中models/mixins/new_validatable_mixin.ValidatableMixin的典型用法代码示例。如果您正苦于以下问题:TypeScript ValidatableMixin类的具体用法?TypeScript ValidatableMixin怎么用?TypeScript ValidatableMixin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ValidatableMixin类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

 constructor(material: Material, task: Task) {
   ValidatableMixin.call(this);
   this.material = stream(material);
   this.task     = stream(task);
   this.validateAssociated("material");
   this.validateAssociated("task");
 }
开发者ID:Skarlso,项目名称:gocd,代码行数:7,代码来源:new_validatable_mixin_spec.ts

示例2: constructor

 protected constructor(name: string,
                       autoUpdate: boolean,
                       errors: { [key: string]: string[] } = {}) {
   super();
   this.name       = stream(name);
   this.autoUpdate = stream(autoUpdate);
   ValidatableMixin.call(this);
   this.errors(new Errors(errors));
 }
开发者ID:GaneshSPatil,项目名称:gocd,代码行数:9,代码来源:material.ts

示例3: constructor

 constructor(directive: string, action: string, type: string, resource: string) {
   super();
   ValidatableMixin.call(this);
   this.directive = stream(directive);
   this.action    = stream(action);
   this.type      = stream(type);
   this.resource  = stream(resource);
   this.validatePresenceOf("directive");
   this.validatePresenceOf("action");
   this.validatePresenceOf("type");
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例4: constructor

  constructor(id?: string, pluginId?: string, properties?: Configurations) {
    this.id         = stream(id);
    this.pluginId   = stream(pluginId);
    this.properties = stream(properties);

    ValidatableMixin.call(this);
    this.validatePresenceOf("pluginId");
    this.validatePresenceOf("id");
    this.validateFormatOf("id",
                          new RegExp("^[-a-zA-Z0-9_][-a-zA-Z0-9_.]*$"),
                          {message: "Invalid Id. This must be alphanumeric and can contain underscores and periods (however, it cannot start with a period)."});
    this.validateMaxLength("id", 255, {message: "The maximum allowed length is 255 characters."});
  }
开发者ID:GaneshSPatil,项目名称:gocd,代码行数:13,代码来源:types.ts


注:本文中的models/mixins/new_validatable_mixin.ValidatableMixin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。