validateValues method
Implementation
ValidationResult validateValues(List<Object>? values, String contextPath) {
if (values == null) {
return ValidationResult.valid();
}
if (values.isEmpty) {
return ValidationResult.invalid(
contextPath: contextPath,
errors: ['Claim "values" cannot be an empty list if provided.'],
);
}
for (var k = 0; k < values.length; k++) {
final value = values[k];
if (value is! String && value is! int && value is! bool) {
return ValidationResult.invalid(
contextPath: '$contextPath[$k]',
errors: ['Claim "values" must be String, int, or bool.'],
);
}
}
return ValidationResult.valid();
}