{"record":{"id":"b2bef44286e05f66","repo":"Semantic-Org/Semantic-UI","slug":"name-must-have-a-different-value-than-rulevalue","errorCode":null,"errorMessage":"{name} must have a different value than {ruleValue} field","messagePattern":"(.+?) must have a different value than (.+?) field","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/behaviors/form.js","lineNumber":1275,"sourceCode":"    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\"])',\n    submit     : '.submit:not([type=\"submit\"])',\n    uiCheckbox : '.ui.checkbox',","sourceCodeStart":1257,"sourceCodeEnd":1293,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1257-L1293","documentation":"Default prompt for the Semantic UI Form `different` rule (settings.rules.different, form.js:1542). Requires the field value to DIFFER from another field's value (located the same way as `match`: data-validate → id → name). Stringified strict inequality. Returns FALSE (failing) when the target field is missing, so a bad identifier makes the field 'not different enough' and shows the prompt.","triggerScenarios":"`{type:'different[new-password]'}` where the new password field equals the current field, OR the identifier does not resolve to any field (target missing → returns false → prompt shown).","commonSituations":"Forcing a new password to differ from the old one; username vs password; identifier typos causing spurious failures.","solutions":["Change the value so it differs from the referenced field.","Ensure the identifier resolves via `data-validate`/`id`/`name` on the other field.","Use `data-validate` to disambiguate when id and name differ.","Add a custom `prompt`."],"exampleFix":"// before\nrules: [{ type: 'different[current-password]' }]\n\n// after\n// <input data-validate=\"current-password\">\nrules: [{ type: 'different[current-password]', prompt: 'New password must differ from your current one' }]","handlingStrategy":"validation","validationCode":"function resolveField(id) {\n  return $('[data-validate=\"'+id+'\"]').val() ?? $('#'+id).val() ?? $('[name=\"'+id+'\"]').val();\n}\nconst other = resolveField('current-password');\nif (other === undefined || String($field.val()) === String(other)) { /* warn */ }","typeGuard":"const targetFieldExists = (id) => $('[data-validate=\"'+id+'\"]').length || $('#'+id).length || $('[name=\"'+id+'\"]').length;","tryCatchPattern":null,"preventionTips":["Use data-validate to locate the comparison field reliably.","Remember a missing target makes the rule fail (returns false).","Provide an explicit prompt describing the constraint."],"tags":["semantic-ui","form-validation","cross-field","different","client-side"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}