stringArg function
A string argument of a rule at index. Numbers and booleans are
converted with livrToString. Throws LivrSchemaException for other
values.
Implementation
String stringArg(List<Object?> args, int index, String ruleName) {
final arg = ruleArg(args, index, ruleName);
if (isPrimitive(arg)) return livrToString(arg);
throw LivrSchemaException('Rule [$ruleName] expects a string, got [$arg]');
}