优化自定义页面设置,页面URL不再支持填写本地文件

This commit is contained in:
GoEdgeLab
2023-07-07 11:48:36 +08:00
parent e27c0280ff
commit 5f69761ac4
6 changed files with 89 additions and 24 deletions

View File

@@ -45,7 +45,8 @@ func (this *CreatePopupAction) RunPost(params struct {
case shared.BodyTypeURL:
params.Must.
Field("url", params.URL).
Require("请输入要显示的URL")
Require("请输入要显示的URL").
Match( `^(?i)(http|https)://`, "请输入正确的URL")
case shared.BodyTypeHTML:
params.Must.
Field("body", params.Body).