Skip to content

API reference / Quittio \ Core \ Validation

Rule

interface in quittio/core

Quittio\Core\Validation\Rule · Source

A business or plausibility rule checked in PHP (levels L1 to L3 and L7).

Methods#

MethodDescription
->check()
->code()Official rule code (e.g. BR-CO-25, BR-DE-1) or a package code (QUITTIO-…).
->level()

check()#

public function check(
    InvoiceData $invoice,
    ValidationContext $context,
): iterable<ValidationMessage>
ParameterTypeDescription
$invoiceInvoiceData
$contextValidationContext
Returns
iterable<ValidationMessage>

code()#

public function code(): string

Official rule code (e.g. BR-CO-25, BR-DE-1) or a package code (QUITTIO-…).

Returns
string

level()#

public function level(): ValidationLevel
Returns
ValidationLevel

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.