PassportElementError.dataField constructor
- @Assert('source == PassportElementErrorSource.data', 'source must be PassportElementErrorSource.data')
- @Default(PassportElementErrorSource.data) PassportElementErrorSource source,
- required PassportType type,
- required String message,
- @JsonKey(name: 'field_name') required String fieldName,
- @JsonKey(name: 'data_hash') required String dataHash,
Represents an error in data provided by the user
Implementation
@Assert(
'source == PassportElementErrorSource.data',
'source must be PassportElementErrorSource.data',
)
const factory PassportElementError.dataField({
/// Error source, must be "data"
@Default(PassportElementErrorSource.data) PassportElementErrorSource source,
/// The section of the user's Telegram Passport which has the error
required final PassportType type,
/// Error message
required final String message,
/// Name of the data field which has the error
@JsonKey(name: 'field_name') required final String fieldName,
/// Base64-encoded data hash
@JsonKey(name: 'data_hash') required final String dataHash,
}) = PassportElementErrorDataField;