Expiry Date Text

Defined in library scandit_datacapture_label

ExpiryDateText
class ExpiryDateText : TextField

Added in version 7.2.0

A specialized text field for capturing expiry dates. This predefined field type is optimized for recognizing date formats commonly found on product labels, packaging, and documents.

The field can be configured with specific date formats using LabelDateFormat to ensure proper parsing of various date representations (MM/dd/yyyy, dd.MM.yyyy, etc.).

Use the builder pattern with ExpiryDateTextBuilder for convenient configuration.

ExpiryDateText(name)
 ExpiryDateText(String name)

Added in version 7.2.0

Builds a new instance of this class with the provided name.

name
String get name

Added in version 7.2.0

Returns the name associated with this instance.

patterns
List<String> get patterns

Added in version 7.2.0

The regex patterns that identify the target string in the scanned content.

isOptional
bool get isOptional

Added in version 7.2.0

Whether the field is optional or mandatory. This is helpful when certain fields may not be present on every scan.

dataTypePatterns
List<String> get dataTypePatterns

Added in version 7.2.0

Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same pattern (e.g., when both packaging and expiry dates are present).

labelDateFormat
LabelDateFormat? labelDateFormat

Added in version 7.2.0

Used to get and set the LabelDateFormat used to parse dates.