Model
InvoiceValidator
Magento\Sales\Model\Order\Invoice\InvoiceValidator
What it does
This class validates invoice entities in Magento 2 by running a set of validators against an invoice object.
Developers use this class when they need to ensure an invoice meets all business rules and validation requirements before it's saved or processed.
It acts as a facade that delegates the actual validation work to a generic validator service.
Public Methods
- validate()