feat(plugin): 字段正则校验 — validation.pattern 支持
Cargo.toml 新增 regex 依赖。validate_data 函数扩展支持 FieldValidation.pattern 正则校验,空值非必填字段跳过校验, 校验失败时返回自定义 message 或默认提示。
This commit is contained in:
@@ -24,3 +24,4 @@ async-trait = { workspace = true }
|
||||
sha2 = { workspace = true }
|
||||
base64 = "0.22"
|
||||
moka = { version = "0.12", features = ["sync"] }
|
||||
regex = "1"
|
||||
|
||||
Reference in New Issue
Block a user