{"record":{"id":"ee64608cbe459526","repo":"Semantic-Org/Semantic-UI","slug":"name-cannot-be-longer-than-rulevalue-character","errorCode":null,"errorMessage":"{name} cannot be longer than {ruleValue} characters","messagePattern":"(.+?) cannot be longer than (.+?) characters","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/behaviors/form.js","lineNumber":1273,"sourceCode":"    checked              : '{name} must be checked',\n    email                : '{name} must be a valid e-mail',\n    url                  : '{name} must be a valid url',\n    regExp               : '{name} is not formatted correctly',\n    integer              : '{name} must be an integer',\n    decimal              : '{name} must be a decimal number',\n    number               : '{name} must be set to a number',\n    is                   : '{name} must be \"{ruleValue}\"',\n    isExactly            : '{name} must be exactly \"{ruleValue}\"',\n    not                  : '{name} cannot be set to \"{ruleValue}\"',\n    notExactly           : '{name} cannot be set to exactly \"{ruleValue}\"',\n    contain              : '{name} must contain \"{ruleValue}\"',\n    containExactly       : '{name} must contain exactly \"{ruleValue}\"',\n    doesntContain        : '{name} cannot contain  \"{ruleValue}\"',\n    doesntContainExactly : '{name} cannot contain exactly \"{ruleValue}\"',\n    minLength            : '{name} must be at least {ruleValue} characters',\n    length               : '{name} must be at least {ruleValue} characters',\n    exactLength          : '{name} must be exactly {ruleValue} characters',\n    maxLength            : '{name} cannot be longer than {ruleValue} characters',\n    match                : '{name} must match {ruleValue} field',\n    different            : '{name} must have a different value than {ruleValue} field',\n    creditCard           : '{name} must be a valid credit card number',\n    minCount             : '{name} must have at least {ruleValue} choices',\n    exactCount           : '{name} must have exactly {ruleValue} choices',\n    maxCount             : '{name} must have {ruleValue} or less choices'\n  },\n\n  selector : {\n    checkbox   : 'input[type=\"checkbox\"], input[type=\"radio\"]',\n    clear      : '.clear',\n    field      : 'input, textarea, select',\n    group      : '.field',\n    input      : 'input',\n    message    : '.error.message',\n    prompt     : '.prompt.label',\n    radio      : 'input[type=\"radio\"]',\n    reset      : '.reset:not([type=\"reset\"])',","sourceCodeStart":1255,"sourceCodeEnd":1291,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1255-L1291","documentation":"Default prompt for the Semantic UI Form `maxLength` rule (settings.rules.maxLength, form.js:1510). Shown when `value.length > maxLength`. Guarded against undefined value (returns false).","triggerScenarios":"`{type:'maxLength[140]'}` with input of 141+ characters; pasted text exceeding a tweet-style limit.","commonSituations":"Bio/status fields, SMS previews, textarea limits; counting characters where the UI shows a different counter.","solutions":["Shorten the value to at most the maximum.","Confirm the bracket value is the maximum (not the minimum).","Add a live character counter matching the rule.","Add a custom `prompt`."],"exampleFix":"// before\nrules: [{ type: 'maxLength[140]' }]\n\n// after\nrules: [{ type: 'maxLength[140]', prompt: 'Keep it under 140 characters' }]","handlingStrategy":"validation","validationCode":"const max = 140;\nif (($field.val() || '').length > max) { /* warn */ }","typeGuard":"const withinMaxLength = (v, max) => String(v).length <= max;","tryCatchPattern":null,"preventionTips":["Add a visible countdown counter that matches the rule.","Set maxlength attribute to cap typing.","Trim pasted content before validation."],"tags":["semantic-ui","form-validation","length","client-side"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}