Webform element validation custom module
i was able to get the value of surname from the Formstate, the form state had surname in surname field itself.

public static function validate(array &amp;$element, FormStateInterface $formState, array &amp;$form) {      
    $webformKey = $element['#webform_key'];       
    $value = $formState-&gt;getValue($webformKey);
    $surname= $formState-&gt;getValue('surname');
}


this did the trick.