isValidName static method

String? isValidName(
  1. String? fullName
)

Implementation

static String? isValidName(String? fullName) {
  if (fullName == null || fullName.isEmpty) {
    return 'Please enter a valid name.';
  }
  if (fullName.length > 85) {
    return 'Name must not exceed 85 characters.';
  }
  if (fullName.length < 3) {
    return 'Name must be atleast 3 Characters';
  }

  return null;
}