validate static method
Implementation
static validate(Map<String, dynamic> map) {
final keys = map.keys.toList();
for (final key in keys) {
if (!availableOptions.contains(key)) {
throw Exception(
'''Invalid option: $key \n
Available Options: ${availableOptions.join(', ')}''',
);
}
}
return map;
}