Log in
Model

StockIdValidator

Magento\Inventory\Model\StockSourceLink\Validator\StockIdValidator

What it does

This validator ensures that a stock ID in a StockSourceLink is valid by checking it's not empty.

Developers use this when creating or updating stock-source link relationships to ensure data integrity before saving to the database.

It's automatically invoked by Magento's inventory management system during stock source link operations.

Public Methods

  • validate()