MCPcopy
hub / github.com/simstudioai/sim / validateAlphanumericId

Function validateAlphanumericId

apps/sim/lib/core/security/input-validation.ts:178–190  ·  view source on GitHub ↗
(
  value: string | null | undefined,
  paramName = 'ID',
  maxLength = 100
)

Source from the content-addressed store, hash-verified

176 * ```
177 */
178export function validateAlphanumericId(
179 value: string | null | undefined,
180 paramName = 'ID',
181 maxLength = 100
182): ValidationResult {
183 return validatePathSegment(value, {
184 paramName,
185 maxLength,
186 allowHyphens: true,
187 allowUnderscores: true,
188 allowDots: false,
189 })
190}
191
192/**
193 * Validates a numeric ID

Callers 15

refineConfluencePageIdFunction · 0.90
addAlphanumericIdIssueFunction · 0.90
deleteSubscriptionFunction · 0.90
createSubscriptionFunction · 0.90
deleteSubscriptionFunction · 0.90
deleteByIdFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 1

validatePathSegmentFunction · 0.85

Tested by

no test coverage detected