Interface
ValidatorInterface
Magento\Sales\Model\ValidatorInterface
What it does
This interface defines a contract for validators in Magento 2's Sales module.
Developers implement this interface to create custom validation logic for sales entities like orders, invoices, shipments, or credit memos.
When implemented, the validate method accepts a sales entity and returns an array of validation error messages, throwing exceptions if validation fails critically.
Public Methods
- validate()