MCPcopy
hub / github.com/swagger-api/swagger-ui / validateMaxLength

Function validateMaxLength

src/core/utils/index.js:360–364  ·  view source on GitHub ↗
(val, max)

Source from the content-addressed store, hash-verified

358}
359
360export const validateMaxLength = (val, max) => {
361 if (val.length > max) {
362 return `Value must be no longer than ${max} character${max !== 1 ? "s" : ""}`
363 }
364}
365
366export const validateUniqueItems = (val, uniqueItems) => {
367 if (!val) {

Callers 2

utils.jsFile · 0.90
validateValueBySchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…