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 &$element, FormStateInterface $formState, array &$form) {
public static function validate(array &$element, FormStateInterface $formState, array &$form) {
$webformKey = $element['#webform_key'];
$value = $formState->getValue($webformKey);
$surname= $formState->getValue('surname');
}
this did the trick.