屬性值規格
類型名稱:PropertyValueSpec
擴展至無形
名稱 |
類型 |
說明 |
預設值 |
Text 或 Thing |
輸入的預設值。針對預期常值的屬性,預設值為預設值。如果是預期物件的屬性,此屬性就是其中一個目前值的 ID 參照。 |
最大值 |
Number |
某些特性或屬性的最大值。 |
minValue (最小值) |
Number |
某些特性或屬性的下限。 |
多重值 |
布林 |
屬性是否支援多個值。預設值為 false。 |
唯讀值 |
布林 |
屬性是否可變動。預設值為 False 為含有值的屬性指定此屬性,使其運作方式與 HTML 表單中的「隱藏」輸入類似。 |
步驟值 |
Number |
stepValue 屬性表示 PropertyValueSpec 中的值預期 (以及必要) 精細程度。 |
值長度上限 |
Number |
指定文字值中允許的字元數範圍。 |
值長度下限 |
Number |
指定常值值中可用的字元數下限範圍。 |
valueName |
Text |
以類似 HTML 的 input@name 的方式,指定要用於網址範本和表單編碼的 PropertyValueSpec 名稱。 |
值模式 |
Text |
指定規則運算式,根據 HTML 規格測試常值。 |
必要值 |
布林 |
是否必須填入屬性才能完成動作。預設值為 false。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-04 (世界標準時間)。
[null,null,["上次更新時間:2024-09-04 (世界標準時間)。"],[[["`PropertyValueSpecification` extends `Intangible` and describes the metadata of a property's value like default, minimum, and maximum values."],["It specifies constraints on the property value such as allowed data types, length, and whether it's required or read-only."],["This type helps define how property values should be handled and validated within a given context, like a web form or structured data."],["Properties like `multipleValues`, `readonlyValue`, and `valueRequired` provide control over the behavior and presentation of the associated property."],["Developers can use attributes like `valueName` and `valuePattern` to manage URL templates, form encoding, and data validation according to specific requirements."]]],["`PropertyValueSpecification` defines properties for input values. It includes `defaultValue` (text or thing), `maxValue`, and `minValue` (numbers). `multipleValues`, `readonlyValue`, and `valueRequired` are booleans that manage input behavior. `stepValue`, `valueMaxLength`, and `valueMinLength` control numerical and textual granularity and length. The `valueName` identifies the specification and the `valuePattern` tests literal values using a regular expression. The content also specifies the type of each property.\n"]]