Class EInvoiceExtensions
- Namespace
- HeroKit.Globalization.Turkey
- Assembly
- HeroKit.dll
Validation helpers for Turkish e-Fatura and e-Arşiv documents.
public static class EInvoiceExtensions
- Inheritance
-
EInvoiceExtensions
- Inherited Members
Methods
IsValidEttn(string?)
Checks whether a string is a valid ETTN (Evrensel Tekil Tanımlama Numarası): a UUID in the 8-4-4-4-12 hexadecimal format.
public static bool IsValidEttn(this string? value)
Parameters
valuestringThe ETTN, for example "51d3bb18-9650-4c8e-825d-5a7f845be630".
Returns
- bool
True if the value is a non-empty UUID with hyphens; otherwise false.
IsValidGibInvoiceNumber(string?)
Checks whether a string is a valid e-Fatura or e-Arşiv invoice number in the GİB format (3-character series, 4-digit year, 9-digit sequence).
public static bool IsValidGibInvoiceNumber(this string? value)
Parameters
valuestringThe invoice number, for example "ABC2026000000001".
Returns
- bool
True if the value has the GİB format; otherwise false.
Examples
"ABC2026000000001".IsValidGibInvoiceNumber(); // true
"ABC2026000000000".IsValidGibInvoiceNumber(); // false: sequence starts at 1