static String? genericValidator(String? value, String type) { if (value == null || value.isEmpty) { return "$type cannot be empty"; } return null; }