feat: 红包个数限制10w个

This commit is contained in:
wangsongsole 2023-06-26 15:48:51 +08:00
parent 7ce3aa8649
commit e23fb84108
1 changed files with 7 additions and 2 deletions

View File

@ -18,8 +18,8 @@ export default {
{ type: "required", message: "请输入红包个数" },
{
type: "regExp",
message: "请输入0 ~ 999999999个红包个数",
reg: /^([0-9][0-9]{0,8})$/
message: "请输入1 ~ 100000个正整数红包",
reg: /^[1-9]\d{0,4}$|^100000$/
}
],
denomination: [{ type: "required", message: "请输入0.01 ~ 200面额" }, { ...regObj }],
@ -113,6 +113,11 @@ export function additionalRules({ model, computeMax }) {
return false
}
if (model.denomination > model.day_budget) {
Notify.error("单天预算发放上限应该大于或等于面额")
return false
}
if (model.receive_every === 1 && model.receive_num > 10) {
Notify.error("每日红包最高上限为10个")
return false