Date Text Builder
Defined in package com.scandit.datacapture.label.capture
- DateTextBuilder
class DateTextBuilder : TextFieldBuilder
Added in version 7.6.0
Builder class for creating DateText field definitions. Provides a fluent interface for configuring text field properties including validation regexes, location constraints, and OCR-specific settings.
- setAnchorRegexes(anchorRegexes)
fun setAnchorRegexes(anchorRegexes: String): DateTextBuilder
Added in version 8.0.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).
- setAnchorRegexes(anchorRegexes)
fun setAnchorRegexes(anchorRegexes: Iterable<String>): DateTextBuilder
Added in version 8.0.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).
- setAnchorRegex(anchorRegex)
fun setAnchorRegex(anchorRegex: Regex): DateTextBuilder
Added in version 8.0.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).
- resetAnchorRegexes()
fun resetAnchorRegexes(): DateTextBuilder
Added in version 8.0.0
This method can be used to remove the default anchorRegex, allowing you to rely solely on the valueRegexes for detection.
- setLabelDateFormat(labelDateFormat)
fun setLabelDateFormat(labelDateFormat: LabelDateFormat): DateTextBuilder
Added in version 7.6.0
Sets a LabelDateFormat to use when recognising this date.
- build(name)
fun build(name: String): DateText
Added in version 7.6.0
Creates a DateText field definition with the specified name and all configured properties.
- getThis()
fun getThis(): DateTextBuilder
Added in version 7.6.0
Returns this builder instance for method chaining.