Semantic-Org/Semantic-UI · warning
{name} cannot contain exactly "{ruleValue}"
Error message
{name} cannot contain exactly "{ruleValue}" What it means
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.
Source
Thrown at src/definitions/behaviors/form.js:1269
},
prompt: {
empty : '{name} must have a value',
checked : '{name} must be checked',
email : '{name} must be a valid e-mail',
url : '{name} must be a valid url',
regExp : '{name} is not formatted correctly',
integer : '{name} must be an integer',
decimal : '{name} must be a decimal number',
number : '{name} must be set to a number',
is : '{name} must be "{ruleValue}"',
isExactly : '{name} must be exactly "{ruleValue}"',
not : '{name} cannot be set to "{ruleValue}"',
notExactly : '{name} cannot be set to exactly "{ruleValue}"',
contain : '{name} must contain "{ruleValue}"',
containExactly : '{name} must contain exactly "{ruleValue}"',
doesntContain : '{name} cannot contain "{ruleValue}"',
doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
minLength : '{name} must be at least {ruleValue} characters',
length : '{name} must be at least {ruleValue} characters',
exactLength : '{name} must be exactly {ruleValue} characters',
maxLength : '{name} cannot be longer than {ruleValue} characters',
match : '{name} must match {ruleValue} field',
different : '{name} must have a different value than {ruleValue} field',
creditCard : '{name} must be a valid credit card number',
minCount : '{name} must have at least {ruleValue} choices',
exactCount : '{name} must have exactly {ruleValue} choices',
maxCount : '{name} must have {ruleValue} or less choices'
},
selector : {
checkbox : 'input[type="checkbox"], input[type="radio"]',
clear : '.clear',
field : 'input, textarea, select',
group : '.field',
input : 'input',View on GitHub (pinned to 597843ab84)
Solutions
- Remove the exact-case forbidden substring.
- If all cases should be blocked, use `doesntContain`.
- Add a custom `prompt` clarifying case sensitivity.
Example fix
// before
rules: [{ type: 'doesntContainExactly[Admin]' }]
// after
rules: [{ type: 'doesntContainExactly[Admin]', prompt: 'Value cannot contain "Admin"' }] Defensive patterns
Strategy: validation
Validate before calling
const banned = 'Admin';
if (($field.val() || '').indexOf(banned) !== -1) { /* warn (case-sensitive) */ } Type guard
const containsBannedExact = (v, t) => String(v).indexOf(t) !== -1;
Prevention
- Remember the match is case-sensitive; lowercase variants slip through.
- Use doesntContain for case-insensitive bans.
- Set an explicit prompt describing the banned token.
When it happens
Trigger: `{type:'doesntContainExactly[Admin]'}` with input containing `Admin` exactly (e.g. `theAdminPanel`) → fails; `admin` would pass.
Common situations: Case-precise banned-token checks; confusion when lowercase variants slip through because the match is case-sensitive.
Related errors
- {name} must contain exactly "{ruleValue}"
- {name} must be exactly "{ruleValue}"
- {name} cannot be set to exactly "{ruleValue}"
- {name} must contain "{ruleValue}"
- {name} cannot contain "{ruleValue}"
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/671ba7735b4f38f6.
Report an issue: GitHub.