Class DocxFormValidation
- Namespace
- DocToolkit
- Assembly
- DocToolkit.Docx.dll
Whether a set of values fits a document's content controls.
public sealed class DocxFormValidation
- Inheritance
-
DocxFormValidation
- Inherited Members
Remarks
This checks keys AND values. It reports which controls got no value, which values matched nothing and which names are ambiguous — and, for a typed control, whether the value fits: a drop-down value outside its list, a non-date for a date picker and a non-boolean for a check box are each reported under their own DocxFormIssueKind.
A plain text control validates anything, because the underlying library has no constraint to check it against. So a clean result means "nothing detectably wrong", not "every value is right".
Properties
ExpectedKeys
The keys the document asks for.
public IReadOnlyList<string> ExpectedKeys { get; }
Property Value
IsValid
True when Issues is empty — of any kind.
public bool IsValid { get; }
Property Value
Remarks
Upstream has two flags that suppress whole issue kinds, and so change what "valid" means.
Neither is exposed: a property whose meaning depends on an argument is the drift the
*Core convention exists to prevent. Filter Issues by
Kind instead — strictly more information than a flag.
Issues
Everything wrong, in the order the underlying check reported it.
public IReadOnlyList<DocxFormIssue> Issues { get; }
Property Value
SuppliedKeys
The keys that were supplied.
public IReadOnlyList<string> SuppliedKeys { get; }