validateAddress function

String? validateAddress(
  1. String? value
)

Implementation

String? validateAddress(String? value) {
  if (value == null || value.isEmpty) {
    return "lbl_address_required";
  } else if (value.length < 5) {
    return "lbl_address_min_length";
  } else if (!value.contains(' ')) {
    return "lbl_address_must_contain_space";
  }
  return null;
}