{"record":{"id":"671ba7735b4f38f6","repo":"Semantic-Org/Semantic-UI","slug":"name-cannot-contain-exactly-rulevalue","errorCode":null,"errorMessage":"{name} cannot contain exactly \"{ruleValue}\"","messagePattern":"(.+?) cannot contain exactly \"(.+?)\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/behaviors/form.js","lineNumber":1269,"sourceCode":"  },\n\n  prompt: {\n    empty                : '{name} must have a value',\n    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',","sourceCodeStart":1251,"sourceCodeEnd":1287,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1251-L1287","documentation":"Default prompt for the Semantic UI Form `doesntContainExactly` rule (settings.rules.doesntContainExactly, form.js:1479). Prompt key and function name match, so it resolves. Requires the value to NOT contain `{ruleValue}` using case-SENSITIVE substring matching.","triggerScenarios":"`{type:'doesntContainExactly[Admin]'}` with input containing `Admin` exactly (e.g. `theAdminPanel`) → fails; `admin` would pass.","commonSituations":"Case-precise banned-token checks; confusion when lowercase variants slip through because the match is case-sensitive.","solutions":["Remove the exact-case forbidden substring.","If all cases should be blocked, use `doesntContain`.","Add a custom `prompt` clarifying case sensitivity."],"exampleFix":"// before\nrules: [{ type: 'doesntContainExactly[Admin]' }]\n\n// after\nrules: [{ type: 'doesntContainExactly[Admin]', prompt: 'Value cannot contain \"Admin\"' }]","handlingStrategy":"validation","validationCode":"const banned = 'Admin';\nif (($field.val() || '').indexOf(banned) !== -1) { /* warn (case-sensitive) */ }","typeGuard":"const containsBannedExact = (v, t) => String(v).indexOf(t) !== -1;","tryCatchPattern":null,"preventionTips":["Remember the match is case-sensitive; lowercase variants slip through.","Use doesntContain for case-insensitive bans.","Set an explicit prompt describing the banned token."],"tags":["semantic-ui","form-validation","substring","case-sensitive","client-side"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}