Create a value type(创建值类型(Value Type))¶
Follow the steps below to create a value type to use across your platform space.
- Navigate to the Value Types Manager application from the platform sidebar.
- From the top left corner, use the dropdown menu to select the space in which you would like to create a value type.
- Select Create New Value Type from the upper right corner.
- Provide a clear name, description, and unique API name for your value type.

- Choose a base type for your value type.
- (Optional) Define a constraint for your value type. Validators can be regular expressions for
Stringtypes, enums, ranges, or other validation methods depending on the base type. For a full list of constraints supported by base type, review our value type constraints documentation.

- (Optional but recommended) Provide an example preview value for your value type.

- Save your value type.
中文翻译¶
创建值类型(Value Type)¶
请按照以下步骤创建可在平台空间中使用的值类型。
- 从平台侧边栏导航至值类型管理器(Value Types Manager)应用程序。
- 使用左上角的下拉菜单选择要创建值类型的空间。
- 点击右上角的创建新值类型(Create New Value Type)。
- 为值类型提供清晰的名称、描述和唯一的 API 名称(API name)。

- 为值类型选择基础类型(base type)。
- (可选)为值类型定义约束条件。验证器可以是
String类型的正则表达式、枚举、范围,或根据基础类型采用其他验证方法。 有关基础类型支持的完整约束列表,请参阅值类型约束文档。

- (可选但推荐)为值类型提供示例预览值。

- 保存值类型。