Log in
Model

StoreCodeValidator

Magento\Store\Model\Validation\StoreCodeValidator

What it does

This validator ensures that store codes follow Magento's naming conventions.

Developers use this class when creating or updating stores to validate that store codes start with a letter and contain only letters, numbers, and underscores.

It's automatically invoked during store creation/editing to prevent invalid store code formats that could cause routing or system issues.

Public Methods

  • isValid()