title: How do I pass an array of values to a parsleyJS validateMultiple validator?
body: <p>I want to validate a &quot;true/false&quot; requirement on grouped radio inputs using <a href="https://parsleyjs.org/doc/" rel="nofollow noreferrer">parsleyjs</a>.</p>
  <p>I have applied a multiple attribute <code>data-parsley-multiple=&quot;my_input_group&quot;</code> so that they will validate together if <code>required</code>, however I am unsure how to create a custom validator to ensure the value is <code>True</code> and not <code>False</code>.</p>
  <pre><code>&lt;div class=&quot;custom-control custom-radio custom-control-inline&quot;&gt;
    &lt;input 
      type=&quot;radio&quot; id=&quot;customRadioInline1&quot; name=&quot;customRadioInline1&quot; class=&quot;custom-control-input&quot; 
      value=&quot;True&quot; data-parsley-multiple=&quot;my_input_group&quot;&gt;
    &lt;label class=&quot;custom-control-label&quot; for=&quot;customRadioInline1&quot;&gt;Yes&lt;/label&gt;
  &lt;/div&gt;
  &lt;div class=&quot;custom-control custom-radio custom-control-inline&quot;&gt;
    &lt;input 
      type=&quot;radio&quot; id=&quot;customRadioInline2&quot; name=&quot;customRadioInline1&quot; class=&quot;custom-control-input&quot; 
      value=&quot;False&quot; data-parsley-multiple=&quot;my_input_group&quot;&gt;
    &lt;label class=&quot;custom-control-label&quot; for=&quot;customRadioInline2&quot;&gt;No&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I think the way to do it is using <code>validateMultiple</code> to pass an array to a custom validator, however there are no examples in the docs as to how I achieve this. For example, if I add <code>data-parsley-myvalidator=true</code> to each <code>input</code> and use:</p>
  <pre><code>window.Parsley.addValidator('myvalidator', {
    requirementType: 'integer',
    validateMultiple(values, requirement, instance) {
      console.log('values', values);
      return true;
    },
    messages: {
      en: &quot;'Yes' required.&quot;,
    },
  });
  </code></pre>
  <p>I get:</p>
  <blockquote>
  <p>Uncaught Validator <code>undefined</code> only handles multiple values</p>
  </blockquote>
  <p>How do I pass an array of values to a validateMultiple custom validator?</p>