Date Text

Defined in library scandit_datacapture_label

DateText
class DateText : TextField

Added in version 8.3.0

This class is used to define a date field in a LabelDefinition.

DateText(name, labelDateFormat)
 DateText(String name,
        LabelDateFormat labelDateFormat)

Added in version 8.3.0

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

labelDateFormat
LabelDateFormat get labelDateFormat

Added in version 8.3.0

Returns the LabelDateFormat used to parse dates.

name
String get name

Added in version 8.3.0

Returns the name associated with this instance.

valueRegexes
List<String> get valueRegexes

Added in version 8.3.0

The regexes that identify the target string in the scanned content.

isOptional
bool get isOptional

Added in version 8.3.0

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

numberOfMandatoryInstances
int? get numberOfMandatoryInstances

Added in version 8.3.0

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.

anchorRegexes
List<String> get anchorRegexes

Added in version 8.3.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 regex (e.g., when both packaging and expiry dates are present).