feat(plugin): 字段正则校验 — validation.pattern 支持

Cargo.toml 新增 regex 依赖。validate_data 函数扩展支持
FieldValidation.pattern 正则校验,空值非必填字段跳过校验,
校验失败时返回自定义 message 或默认提示。
This commit is contained in:
iven
2026-04-17 10:37:37 +08:00
parent dadb826804
commit 314580243e
2 changed files with 69 additions and 2 deletions

View File

@@ -24,3 +24,4 @@ async-trait = { workspace = true }
sha2 = { workspace = true }
base64 = "0.22"
moka = { version = "0.12", features = ["sync"] }
regex = "1"