swift_mt_message/fields/common/name_field.rs
1use serde::{Deserialize, Serialize};
2use swift_mt_message_macros::SwiftField;
3
4/// Generic Name and Address Field
5///
6/// Used for structured name and address information.
7/// Format: 4*35x (up to 4 lines, 35 characters each)
8/// Validation: line_count, line_length, structured_address
9#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftField)]
10pub struct GenericNameAddressField {
11 /// Lines of name and address information
12 #[component("4*35x", validate = ["line_count", "line_length", "structured_address"])]
13 pub name_and_address: Vec<String>,
14}