Log in
Interface

OrderValidatorInterface

Magento\Sales\Model\Order\OrderValidatorInterface

What it does

This interface defines a contract for validating Magento 2 orders before performing operations like creation, updates, or state changes.

Developers implement this interface to create custom order validation logic that ensures orders meet specific business rules or requirements.

The validate method accepts an order entity and an array of validators, throwing a DocumentValidationException if validation fails.

Public Methods

  • validate()