Redirect from one module to another
An example

    use Drupal\Core\Url;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;


Its not working in Form validate.

Its working un submitform

public function submitForm(array &amp;$form, FormStateInterface $form_state) {
    $url = Url::fromRoute('route.path');
        $form_state-&gt;setRedirectUrl($url);
}