Log in
Interface

ShipmentValidatorInterface

Magento\Sales\Model\Order\Shipment\ShipmentValidatorInterface

What it does

This interface defines a contract for validating shipment data in Magento 2.

Developers implement this interface to create custom shipment validators that check if a shipment meets business rules before it's created or saved.

The validate method accepts a shipment object and an array of validators, returning validation results or throwing an exception if validation fails.

Public Methods

  • validate()