Log in
Model

RestrictedWords

Magento\Backend\Model\Validator\UrlKey\RestrictedWords

What it does

This validator checks if a URL key conflicts with Magento's reserved endpoint names (like 'admin', 'catalog', 'checkout').

Developers use this when validating user-submitted URL keys for products, categories, or CMS pages to prevent conflicts with core Magento routes.

It returns an array of error messages if the URL key matches restricted words, or an empty array if valid.

Public Methods

  • validate()