mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 12:23:35 +08:00
feat: 添加网站前确保记录不存在
This commit is contained in:
@@ -52,7 +52,7 @@ func (c *WebsiteController) Add(ctx http.Context) {
|
||||
return
|
||||
}
|
||||
validator, err := ctx.Request().Validate(map[string]string{
|
||||
"name": "required|regex:^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$",
|
||||
"name": "required|regex:^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$|not_exists:websites,name",
|
||||
"domain": "required",
|
||||
"php": "required",
|
||||
"db": "bool",
|
||||
|
||||
Reference in New Issue
Block a user