INNER CODE UNIT · JavaScript

validationError

Arenukvern/mcp_flutter · showcase/flutter_test_app/web/intentcall_webmcp.generated.js:71

  function validationError(message) {
    return { ok: false, code: 'validation_error', message: message };
  }

  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) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…