Model
InvoiceValidator
Magento\Sales\Model\Order\Invoice\InvoiceValidator
What it does
This class validates invoice entities before they are saved or processed in Magento 2.
Developers use this validator to ensure invoices meet all business rules and constraints by running them through a collection of validation rules.
It acts as a facade to the general Sales validator, specifically for invoice-related validation workflows.
Public Methods
- validate()