Home > Mobile >  Small program weui check form rules - the validator how to obtain this. The data?
Small program weui check form rules - the validator how to obtain this. The data?

Time:09-17

Data: {
A: 1,
Rules: [{
Name: '_name'
Rules: [{required: true, the message: 'please enter your name}, {
The validator: function (rule, the value, the param, modeels) {
//want to get a here, but this is undefined
if (! Tools. The validation. IsChinese (value)) return "please input Chinese name
"If (value & amp; & Return a value. The length==1) 'name format is not correct'
}
},
}]
}
  • Related