validateText function

String? validateText(
  1. String? value
)

Implementation

String? validateText(String? value) {
  if (value == null || value.isEmpty) {
    return "lbl_required_field";
  } else if (!value.contains(RegExp(r'^[a-zA-Z]+$'))) {
    return "lbl_insert_valid_text";
  }
  return null;
}