Explorar o código

收货地址收货人姓名长度大于2

guhongwei %!s(int64=2) %!d(string=hai) anos
pai
achega
f32562c652
Modificáronse 1 ficheiros con 10 adicións e 4 borrados
  1. 10 4
      pagesMy/address/add.vue

+ 10 - 4
pagesMy/address/add.vue

@@ -54,10 +54,16 @@
 				form: {},
 				rules: {
 					name: {
-						rules: [{
-							required: true,
-							errorMessage: '请输入收货人',
-						}]
+						rules: [ //
+							{
+								required: true,
+								errorMessage: '请输入收货人',
+							},
+							{
+								minLength: 2,
+								errorMessage: '收货人名称长度至少在 {minLength} 个字符以上',
+							}
+						]
 					},
 					phone: {
 						rules: [{