How to validate all elements in Custom Widget
A GOOD example of this approach is Field_example module from Example module for developers.(link here https://www.drupal.org/project/examples/releases/8.x-1.x-dev).

The widget with the "field_example_3text" id has also 3 elements: "r", "g, "b", and the values are accessed in validation function:

  foreach (['r', 'g', 'b'] as $colorfield) {

      $values[$colorfield] = $element[$colorfield]['#value'];
  }


So create an array containing your keys elements and loop into it, accessing the values by writing $element['your key']['#value'];

Have a look at this module.
The dpm of the $element variable looks like this: