當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。