{"record":{"id":"03936d9c23ccee28","repo":"Semantic-Org/Semantic-UI","slug":"name-cannot-be-set-to-rulevalue","errorCode":null,"errorMessage":"{name} cannot be set to \"{ruleValue}\"","messagePattern":"(.+?) cannot be set to \"(.+?)\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/behaviors/form.js","lineNumber":1264,"sourceCode":"  },\n\n  text: {\n    unspecifiedRule  : 'Please enter a valid value',\n    unspecifiedField : 'This field'\n  },\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 : {","sourceCodeStart":1246,"sourceCodeEnd":1282,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1246-L1282","documentation":"Default prompt for the Semantic UI Form `not` rule (settings.rules.not, form.js:1440). Requires the value to be DIFFERENT from the forbidden `{ruleValue}` (case-insensitive). Shown when the value equals the forbidden value.","triggerScenarios":"`{type:'not[password]'}` with input `password`; `{type:'not[admin]'}` with input `ADMIN` (case-insensitive, so it matches and fails).","commonSituations":"Preventing a new password equal to a username/common word, or blocking a reserved value. Case-insensitivity can surprise users who expect `Admin` to be allowed when `admin` is forbidden.","solutions":["Choose a value different from the forbidden one.","If case-sensitive blocking is intended, use `notExactly`.","Provide a custom `prompt` explaining what is blocked."],"exampleFix":"// before\nrules: [{ type: 'not[password]' }]  // input 'PASSWORD' fails (case-insensitive)\n\n// after\nrules: [{ type: 'notExactly[password]', prompt: 'Cannot use \"password\" as your password' }]","handlingStrategy":"validation","validationCode":"const blocked = 'password';\nif (($field.val() || '').toLowerCase() === blocked.toLowerCase()) { /* warn: forbidden */ }","typeGuard":"const isForbiddenCI = (v, t) => String(v).toLowerCase() === String(t).toLowerCase();","tryCatchPattern":null,"preventionTips":["Remember not is case-insensitive; use notExactly for case-sensitive blocking.","Document blocked values in the prompt.","Block common values server-side too."],"tags":["semantic-ui","form-validation","inequality","client-side"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}