Label Field Definition

Defined in namespace Scandit.DataCapture.Label.Capture

LabelFieldDefinition
abstract class LabelFieldDefinition : IDisposable

Added in version 8.1.0

Base class for defining fields within a label. Label field definitions specify the expected content, validation regexes, and constraints for individual data elements that make up a label structure.

Field definitions are used within LabelDefinition objects to describe the composition of labels, including what types of data to expect (barcodes, text, dates) and how to validate that data.

Name
string Name { get; }

Added in version 8.1.0

The unique identifier for this field within the label definition. This name is used to reference the field when processing captured results and must be unique within the label definition.

ValueRegexes
IList<string> ValueRegexes { get; }

Added in version 8.1.0

Gets regular expressions used to validate captured content. These regexes allow you to ensure that the captured data matches the expected format for your specific field type.

Optional
bool Optional { get; }

Added in version 8.1.0

Gets a value indicating whether this field is required for the label to be considered complete.

Optional fields are useful for scenarios where certain information might not always be present on labels, such as promotional codes or secondary identifiers.

NumberOfMandatoryInstances
int NumberOfMandatoryInstances { get; }

Added in version 8.1.0

Gets the minimum number of instances of this field that must be captured for the label to be considered complete. This is useful for fields that may appear multiple times on a label, such as multiple serial numbers or repeated information.