Redirect to Different URl on validation errors in form builder
You can use like

For Internal:

global $base_url;
$response = new TrustedRedirectResponse($base_url.'/landing-page#lead-form');
// You can use any one of these below to show error message.
$form_state-&gt;setError($element, $message);
$form_state-&gt;setErrorByName($element, $message);
$form_state-&gt;setResponse($response);


For External:
Use full link

$response = new TrustedRedirectResponse('https://facebook.com');
// You can use any one of these below to show error message.
$form_state-&gt;setError($element, $message);
$form_state-&gt;setErrorByName($element, $message);
$form_state-&gt;setResponse($response);