這個物件會為附加的資訊方塊定義驗證規則。
適用於 Google Chat 應用程式和 Google Workspace 外掛程式。
const validation = CardService.newValidation().setCharacterLimit('10').setInputType( CardService.InputType.TEXT);
方法
| 方法 | 傳回類型 | 簡短說明 | 
|---|---|---|
| set | Validation | 設定小工具的字元限制。 | 
| set | Validation | 設定小工具的輸入類型。 | 
內容詳盡的說明文件
set
設定小工具的字元限制。
適用於 Google Chat 應用程式和 Google Workspace 外掛程式。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| character | Integer | 要設定的字元限制。請注意,這項限制只適用於 Text,其他小工具會忽略這項限制。 | 
回攻員
Validation:這個物件用於鏈結。
set
設定小工具的輸入類型。
適用於 Google Chat 應用程式和 Google Workspace 外掛程式。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| input | Input | 要設定的 Input。 | 
回攻員
Validation:這個物件用於鏈結。