update image validation

This commit is contained in:
2022-11-27 22:39:32 +08:00
parent ca892632ab
commit f161616eae
3 changed files with 22 additions and 16 deletions

View File

@@ -39,8 +39,8 @@ type UserActivityForm struct {
}
func (u UserActivityForm) Validate() error {
if !strings.HasPrefix(u.Image, "https://m.360buyimg.com") {
return errors.New("不是京东图床链接")
if !strings.HasPrefix(u.Image, "https://") {
return errors.New("不是图床链接")
}
return nil
}