> For the complete documentation index, see [llms.txt](https://docs.coreway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coreway.com/yoov-plus/worksheet/worksheet-design/field-type/text.md).

# 文本

文字欄位是用來記錄與儲存文字資訊的基礎欄位。當內容為連結時，可用來產生二維碼供掃描解析。

## **1. 显示模式** <a href="#id-1-display-mode" id="id-1-display-mode"></a>

* **单行模式**：单行显示，最大可输入 **1000个字符**。内容超出字段宽度时将被遮挡。
* **多行模式：**&#x652F;援換行的多行文字方塊，最大可輸入 **1000 個字元**。

## **2. 默认值设置** <a href="#id-2-default-value-setting" id="id-2-default-value-setting"></a>

支持为字段预设自动填充的内容。

* **固定值**：直接输入固定的文本。
* **动态值**：
  * **其他字段值**：引用本表或关联表中文本、数字、日期、对象等类型的字段值。
  * **查询工作表**：通过查询条件从其他工作表获取匹配的记录，并将其指定字段的值填充至此。
  * **函数计算**：使用函数公式生成计算结果作为文本值。

## **3. 验证规则** <a href="#id-3-validation-rule" id="id-3-validation-rule"></a>

用于确保录入数据的规范性与准确性。

1. **必填**：该字段必须填写内容。
2. **不允许重复**：该字段的值在整个工作表中必须唯一。
3. **限定字数**：可设置最少 `1` 个、最多 `1000` 个字符。
4. **限定输入格式**：系统预置了14种常用格式，输入时会自动校验。您也可直接修改任意格式的正则表达式进行自定义。\
   预置格式列表如下：

| 格式名称        | 正则表达式                                                                                                   | 说明                              |
| ----------- | ------------------------------------------------------------------------------------------------------- | ------------------------------- |
| **字母**      | `^[A-Za-z]*$`                                                                                           | 仅允许英文字母。                        |
| **字母数字**    | `^[A-Za-z0-9]*$`                                                                                        | 仅允许英文字母和数字。                     |
| **数字**      | `^\d*$`                                                                                                 | 仅允许数字。                          |
| **大写字母**    | `^[A-Z]*$`                                                                                              | 仅允许大写英文字母。                      |
| **小写字母**    | `^[a-z]*$`                                                                                              | 仅允许小写英文字母。                      |
| **邮政编码**    | `^\d{4,6}$`                                                                                             | 4到6位数字。                         |
| **IP地址**    | `^((2(5[0-5]\|[0-4]\d)))\|[0-1]?\d{1,2})(.((2(5[0-5]\|[0-4]\d)))\|[0-1]?\d{1,2})){3}$`                  | 标准IP地址格式。                       |
| **链接**      | `^https?:\/\/\w+\.\w+\.\w+.*$`                                                                          | 以 `http://` 或 `https://` 开头的网址。 |
| **内地车牌号**   | `^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]\w{4,9}$`                                                          | 中国大陆机动车号牌格式。                    |
| **中国身份证**   | `^\d{17}[\dX]$`                                                                                         | 18位中国大陆居民身份证号码。                 |
| **中国香港身份证** | `^[A-Z]{1,2}[0-9]{6,10}([0-9A-Z]\|([(（][0-9A-Z][)）]))$`                                                 | 中国香港身份证格式。                      |
| **中国护照**    | `(^[EeKkGgDdSsPpHh]\d{8}$)\|(^(([Ee][a-fA-F])\|([DdSsPp][Ee])\|([Kk][Jj])\|([Mm][Aa])\|(1[45]))\d{7}$)` | 中国护照号码格式。                       |
| **中国香港护照**  | `(^1[45][0-9]{7}$)\|(^G[0-9]{8}$)\|(^P[0-9]{7}$)\|(^S[0-9]{7,8}$)\|(^D[0-9]+$)`                         | 中国香港护照号码格式。                     |

<figure><img src="/files/0MtYiVvHVwJ1cfbDEMga" alt=""><figcaption></figcaption></figure>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coreway.com/yoov-plus/worksheet/worksheet-design/field-type/text.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
