Log in
Model

NameValidator

Magento\Inventory\Model\Stock\Validator\NameValidator

What it does

This validator ensures that a Stock entity has a valid, non-empty name before it can be saved.

Developers use this class as part of Magento's MSI (Multi-Source Inventory) validation chain to prevent creating or updating stocks without proper names.

It's automatically called during stock save operations to maintain data integrity.

Public Methods

  • validate()