INNER CODE UNIT · JavaScript
validateNumericBounds
Arenukvern/mcp_flutter · jaspr_web_example/web/intentcall_webmcp.generated.js:23
function validateNumericBounds(path, schema, value) {
if (schema.minimum != null && value < schema.minimum) {
return validationError(path + ' must be at least ' + schema.minimum + '.');
}
if (schema.maximum != null && value > schema.maximum) {
return validationError(path + ' must be at most ' + schema.maximum + '.');
}
return null;
}
function validateValue(path, schema, value) {
var type = schema.type;
if (!type) return null;
switch (type) {
case 'string':
if (typeof value !== 'string') return validationError(path + ' must be a string.');
return null;
case 'integer':