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