String? validateField(String? value, String field) { if (value != null && value.isEmpty) { return 'Please enter $field'; } else { return null; } }