{"record":{"id":"865abf36ad755ad0","repo":"Semantic-Org/Semantic-UI","slug":"name-must-be-rulevalue","errorCode":null,"errorMessage":"{name} must be \"{ruleValue}\"","messagePattern":"(.+?) must be \"(.+?)\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/behaviors/form.js","lineNumber":1262,"sourceCode":"    number  : /^\\-?\\d*(\\.\\d+)?$/,\n    url     : /(https?:\\/\\/(?:www\\.|(?!www))[^\\s\\.]+\\.[^\\s]{2,}|www\\.[^\\s]+\\.[^\\s]{2,})/i\n  },\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  },","sourceCodeStart":1244,"sourceCodeEnd":1280,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1244-L1280","documentation":"Default prompt for the Semantic UI Form `is` rule (settings.rules.is, form.js:1422). It performs case-INSENSITIVE equality between the field value and the required text (`{ruleValue}`), both lowercased before comparison. Shown when they differ.","triggerScenarios":"`{type:'is[yes]'}` with input `no`, `y`, or `Yes ` (trailing space — note `$.trim` is applied to the value at form.js:1031, so leading/trailing whitespace on the value is trimmed, but not on the ruleValue).","commonSituations":"Confirm-field style rules where exact case matters (use `isExactly` instead), or where the expected token has surrounding whitespace inside the brackets.","solutions":["Match the expected value (case-insensitive).","If case sensitivity is required, use the `isExactly` rule.","Trim the ruleValue or remove stray spaces inside the brackets.","Add a custom `prompt` naming the expected value."],"exampleFix":"// before\nrules: [{ type: 'is[ accept ]' }]  // spaces inside brackets are part of ruleValue\n\n// after\nrules: [{ type: 'is[accept]', prompt: 'You must type \"accept\"' }]","handlingStrategy":"validation","validationCode":"const expected = 'accept';\nif (($field.val() || '').trim().toLowerCase() !== expected.trim().toLowerCase()) { /* warn */ }","typeGuard":"const matchesCaseInsensitive = (v, t) => String(v).trim().toLowerCase() === String(t).trim().toLowerCase();","tryCatchPattern":null,"preventionTips":["Trim the ruleValue to avoid stray-space mismatches.","Use isExactly when case matters.","Set an explicit prompt naming the expected token."],"tags":["semantic-ui","form-validation","equality","client-side"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}