Label Field Definition
Defined in library scandit_datacapture_label
- LabelFieldDefinition
abstract class LabelFieldDefinitionAdded in version 7.2.0
- name
String get name
Added in version 7.2.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
List<String> get valueRegexes
Added in version 8.0.0
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.
For example, you can use regexes like [“\d{2}/\d{2}/\d{4}”] for date formats, or [“[A-Z]{2}\d{6}”] for codes that must start with two letters followed by six digits.
- isOptional
bool get isOptional
Added in version 7.2.0
Determines whether this field is required for the label to be considered complete. When set to true, the label can be marked as complete even if this field is not found. When false (mandatory), the label will only be complete when this field is successfully captured.
Optional fields are useful for scenarios where certain information might not always be present on labels, such as promotional codes or secondary identifiers.