We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
astro-actions.mdx
1 parent cdc9fb6 commit ba12b2cCopy full SHA for ba12b2c
src/content/docs/zh-cn/reference/modules/astro-actions.mdx
@@ -75,7 +75,7 @@ export const server = {
75
76
##### 与 `accept: 'form'` 一起使用
77
78
-如果你的 action 接受表单输入,请使用 `z.object()` 验证器将表单数据自动解析为类型化对象。表单数据字段支持以下验证器:
+如果你的 action 接受表单输入,请使用 `z.object()` 验证器将表单数据自动解析为类型化对象。所有 Zod 验证器均支持表单数据字段(例如 `z.coerce.date()` )。为方便你验证以下类型的字段输入,Astro 在底层还提供了特殊处理:
79
80
- 使用 `z.number()` 验证类型为 `number` 的输入
81
- 使用 `z.coerce.boolean()` 验证类型为 `checkbox` 的输入
0 commit comments