setPostalCode method

dynamic setPostalCode(
  1. String? value
)

set postal code

length limit of value is 1 up to 10.

Implementation

setPostalCode(String? value) {
  if (value != null) {
    if (value.length <= 10) {
      var postalCode = setTLV(value, ID.postalCode);
      this.value = this.value.copyWith(postalCode: postalCode);
    } else {
      throw MaxValueLengthErr(title: "PostalCode", length: "10");
    }
  }
}