📜  验证数组 parsley - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:48.494000             🧑  作者: Mango

代码示例1
//add validateMultiple instead of validateString or ValidateNumber

window.Parsley.addValidator('myvalidator', {
  requirementType: 'integer',
  validateMultiple(values, requirement, instance) {
    console.log('values', values);
    return true;
  },
  messages: {
    en: "'Yes' required.",
  },
});