code: function requiredByAllControls(validator) {
    return function validate(props, propName, component, ...others) {
      let err = validator(props, propName, component, ...others);
  
      if (!err && typeof props[propName] === 'undefined') {
        const invalids = props.controls.filter(c => !c[propName]).map((_, i) => i);
        if (invalids.length) {
          const invalidPrefix = invalids.length === props.controls.length
            ? 'All `controls`'
            : `The \`controls\` at indexes \`${invalids.join('`, `')}\``;
          const invalidMsg = `${invalidPrefix} are missing the \`${propName}\` prop.`;
  
          err = new Error(
            `The \`${propName}\` prop is required to make \`${component}\` accessible for users of ` +
            `assistive technologies such as screen readers. Either add the \`${propName}\` to the \`${component}\` ` +
            `or add the \`${propName}\` to each \`control\` in the \`controls\` prop. ${invalidMsg}`
          );
        }
      }
  
      return err;
    };
  }
docs: A custom PropTypes validator to make sure that each `control` in the `controls` prop
  contains the given `propName`, or the `SelectionControlGroup` has defined that prop.