diff --git a/core/modules/menu_link/src/MenuLinkForm.php b/core/modules/menu_link/src/MenuLinkForm.php
index f5cbca1..73e7bf5 100644
--- a/core/modules/menu_link/src/MenuLinkForm.php
+++ b/core/modules/menu_link/src/MenuLinkForm.php
@@ -11,6 +11,7 @@
 use Drupal\Core\Entity\EntityForm;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Path\AliasManagerInterface;
+use Drupal\Core\Path\PathValidatorInterface;
 use Drupal\Core\Routing\UrlGenerator;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -41,6 +42,13 @@ class MenuLinkForm extends EntityForm {
   protected $urlGenerator;
 
   /**
+   * The path validator.
+   *
+   * @var \Drupal\Core\Path\PathValidatorInterface
+   */
+  protected $pathValidator;
+
+  /**
    * Constructs a new MenuLinkForm object.
    *
    * @param \Drupal\menu_link\MenuLinkStorageInterface $menu_link_storage
@@ -49,11 +57,14 @@ class MenuLinkForm extends EntityForm {
    *   The path alias manager.
    * @param \Drupal\Core\Routing\UrlGenerator $url_generator
    *   The URL generator.
+   * @param \Drupal\Core\Path\PathValidatorInterface $path_validator
+   *   The path validator.
    */
-  public function __construct(MenuLinkStorageInterface $menu_link_storage, AliasManagerInterface $path_alias_manager, UrlGenerator $url_generator) {
+  public function __construct(MenuLinkStorageInterface $menu_link_storage, AliasManagerInterface $path_alias_manager, UrlGenerator $url_generator, PathValidatorInterface $path_validator) {
     $this->menuLinkStorage = $menu_link_storage;
     $this->pathAliasManager = $path_alias_manager;
     $this->urlGenerator = $url_generator;
+    $this->pathValidator = $path_validator;
   }
 
   /**
@@ -63,7 +74,8 @@ public static function create(ContainerInterface $container) {
     return new static(
       $container->get('entity.manager')->getStorage('menu_link'),
       $container->get('path.alias_manager'),
-      $container->get('url_generator')
+      $container->get('url_generator'),
+      $container->get('path.validator')
     );
   }
 
@@ -231,7 +243,7 @@ public function validate(array $form, array &$form_state) {
         $menu_link->link_path = $parsed_link['path'];
       }
     }
-    if (!trim($menu_link->link_path) || !drupal_valid_path($menu_link->link_path, TRUE)) {
+    if (!trim($menu_link->link_path) || !$this->pathValidator->isValid($menu_link->link_path)) {
       $this->setFormError('link_path', $form_state, $this->t("The path '@link_path' is either invalid or you do not have access to it.", array('@link_path' => $menu_link->link_path)));
     }
 
diff --git a/core/modules/path/src/Form/PathFormBase.php b/core/modules/path/src/Form/PathFormBase.php
index a9e80c4..03cbc58 100644
--- a/core/modules/path/src/Form/PathFormBase.php
+++ b/core/modules/path/src/Form/PathFormBase.php
@@ -11,6 +11,7 @@
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Path\AliasManagerInterface;
 use Drupal\Core\Path\AliasStorageInterface;
+use Drupal\Core\Path\PathValidatorInterface;
 use Drupal\Core\Url;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -41,16 +42,26 @@
   protected $aliasManager;
 
   /**
+   * The path validator.
+   *
+   * @var \Drupal\Core\Path\PathValidatorInterface
+   */
+  protected $pathValidator;
+
+  /**
    * Constructs a new PathController.
    *
    * @param \Drupal\Core\Path\AliasStorageInterface $alias_storage
    *   The path alias storage.
    * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
    *   The path alias manager.
+   * @param \Drupal\Core\Path\PathValidatorInterface $path_validator
+   *   The path validator.
    */
-  public function __construct(AliasStorageInterface $alias_storage, AliasManagerInterface $alias_manager) {
+  public function __construct(AliasStorageInterface $alias_storage, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator) {
     $this->aliasStorage = $alias_storage;
     $this->aliasManager = $alias_manager;
+    $this->pathValidator = $path_validator;
   }
 
   /**
@@ -59,7 +70,8 @@ public function __construct(AliasStorageInterface $alias_storage, AliasManagerIn
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('path.alias_storage'),
-      $container->get('path.alias_manager')
+      $container->get('path.alias_manager'),
+      $container->get('path.validator')
     );
   }
 
@@ -146,7 +158,7 @@ public function validateForm(array &$form, array &$form_state) {
     if ($this->aliasStorage->aliasExists($alias, $langcode, $source)) {
       $this->setFormError('alias', $form_state, t('The alias %alias is already in use in this language.', array('%alias' => $alias)));
     }
-    if (!drupal_valid_path($source)) {
+    if (!$this->pathValidator->isValid($source)) {
       $this->setFormError('source', $form_state, t("The path '@link_path' is either invalid or you do not have access to it.", array('@link_path' => $source)));
     }
   }
diff --git a/core/modules/system/src/Form/SiteInformationForm.php b/core/modules/system/src/Form/SiteInformationForm.php
index c2b9c67..09daf45 100644
--- a/core/modules/system/src/Form/SiteInformationForm.php
+++ b/core/modules/system/src/Form/SiteInformationForm.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Path\AliasManagerInterface;
 use Drupal\Core\Form\ConfigFormBase;
+use Drupal\Core\Path\PathValidatorInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -25,17 +26,27 @@ class SiteInformationForm extends ConfigFormBase {
   protected $aliasManager;
 
   /**
+   * The path validator.
+   *
+   * @var \Drupal\Core\Path\PathValidatorInterface
+   */
+  protected $pathValidator;
+
+  /**
    * Constructs a SiteInformationForm object.
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The factory for configuration objects.
    * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
    *   The path alias manager.
+   * @param \Drupal\Core\Path\PathValidatorInterface $path_validator
+   *   The path validator.
    */
-  public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager) {
+  public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator) {
     parent::__construct($config_factory);
 
     $this->aliasManager = $alias_manager;
+    $this->pathValidator = $path_validator;
   }
 
   /**
@@ -44,7 +55,8 @@ public function __construct(ConfigFactoryInterface $config_factory, AliasManager
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('config.factory'),
-      $container->get('path.alias_manager')
+      $container->get('path.alias_manager'),
+      $container->get('path.validator')
     );
   }
 
@@ -142,7 +154,7 @@ public function validateForm(array &$form, array &$form_state) {
       form_set_value($form['front_page']['site_frontpage'], $this->aliasManager->getPathByAlias($form_state['values']['site_frontpage']), $form_state);
     }
     // Validate front page path.
-    if (!drupal_valid_path($form_state['values']['site_frontpage'])) {
+    if (!$this->pathValidator->isValid($form_state['values']['site_frontpage'])) {
       $this->setFormError('site_frontpage', $form_state, $this->t("The path '%path' is either invalid or you do not have access to it.", array('%path' => $form_state['values']['site_frontpage'])));
     }
     // Get the normal paths of both error pages.
@@ -153,11 +165,11 @@ public function validateForm(array &$form, array &$form_state) {
       form_set_value($form['error_page']['site_404'], $this->aliasManager->getPathByAlias($form_state['values']['site_404']), $form_state);
     }
     // Validate 403 error path.
-    if (!empty($form_state['values']['site_403']) && !drupal_valid_path($form_state['values']['site_403'])) {
+    if (!empty($form_state['values']['site_403']) && !$this->pathValidator->isValid($form_state['values']['site_403'])) {
       $this->setFormError('site_403', $form_state, $this->t("The path '%path' is either invalid or you do not have access to it.", array('%path' => $form_state['values']['site_403'])));
     }
     // Validate 404 error path.
-    if (!empty($form_state['values']['site_404']) && !drupal_valid_path($form_state['values']['site_404'])) {
+    if (!empty($form_state['values']['site_404']) && !$this->pathValidator->isValid($form_state['values']['site_404'])) {
       $this->setFormError('site_404', $form_state, $this->t("The path '%path' is either invalid or you do not have access to it.", array('%path' => $form_state['values']['site_404'])));
     }
 
