Table of Contents

Property Validation

Namespace
LMKit.Extraction
Assembly
LM-Kit.NET.dll

Validation

Gets the entity validation result for this element, including the auto-detected entity kind and validation status.

public EntityValidationResult Validation { get; }

Property Value

EntityValidationResult

An EntityValidationResult instance describing the detected EntityKind and whether the extracted value conforms to the expected format. Returns a result with NotApplicable when no entity kind was detected or no validator exists for the detected kind.

Examples

var result = extractor.Parse(document);
foreach (var el in result.Elements)
{
    var v = el.Validation;
    if (v.HasValidator)
    {
        Console.WriteLine($"{el.TextExtractionElement.Name}: {v.EntityKind} = {v.Status}");
    }
    if (v.Status == EntityValidationStatus.Repaired)
    {
        Console.WriteLine($"  Original: {v.OriginalValue}");
    }
}