{"record":{"id":"dc9a63e5d3423abe","repo":"Semantic-Org/Semantic-UI","slug":"there-is-no-rule-matching-the-one-you-specified","errorCode":null,"errorMessage":"There is no rule matching the one you specified","messagePattern":"There is no rule matching the one you specified","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/behaviors/form.js","lineNumber":1307,"sourceCode":"    prompt     : '.prompt.label',\n    radio      : 'input[type=\"radio\"]',\n    reset      : '.reset:not([type=\"reset\"])',\n    submit     : '.submit:not([type=\"submit\"])',\n    uiCheckbox : '.ui.checkbox',\n    uiDropdown : '.ui.dropdown'\n  },\n\n  className : {\n    error   : 'error',\n    label   : 'ui prompt label',\n    pressed : 'down',\n    success : 'success'\n  },\n\n  error: {\n    identifier : 'You must specify a string identifier for each field',\n    method     : 'The method you called is not defined.',\n    noRule     : 'There is no rule matching the one you specified',\n    oldSyntax  : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.'\n  },\n\n  templates: {\n\n    // template that produces error message\n    error: function(errors) {\n      var\n        html = '<ul class=\"list\">'\n      ;\n      $.each(errors, function(index, value) {\n        html += '<li>' + value + '</li>';\n      });\n      html += '</ul>';\n      return $(html);\n    },\n\n    // template that produces label","sourceCodeStart":1289,"sourceCodeEnd":1325,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1289-L1325","documentation":"Semantic UI Form validation error raised in validate.rule (form.js:1024-1025) when a rule's type does not resolve to a function in settings.rules. The validator looks up settings.rules[ruleName]; if undefined/$.isFunction is false, it logs this error and returns early, skipping that field's validation.","triggerScenarios":"Declaring rules:[{type:'emailAdress'}] (typo), referencing a custom rule before adding it via form settings.rules, or using a rule name from a newer/older Semantic UI version that doesn't exist in the loaded build.","commonSituations":"Typos in built-in rule names (email, minLength, isExactly, etc.); defining a custom rule function under settings.rules but misspelling the key used in the field config; bundling only a subset of the form behavior.","solutions":["Compare the rule type string against the keys in $.fn.form.settings.rules to confirm it is registered.","Register custom rules under $.fn.form.settings.rules.myRule = function(value){...} before referencing type:'myRule'.","Fix typos in built-in rule names; remove rule entries that no longer ship in the installed version."],"exampleFix":"// before\n$.fn.form.settings.rules.strongPw = function(v){ return v.length>=12; };\n$('.ui.form').form({ fields: { pw: { rules: [{ type: 'strongpw' }] } } }); // case mismatch\n// after\n$('.ui.form').form({ fields: { pw: { rules: [{ type: 'strongPw' }] } } });","handlingStrategy":"validation","validationCode":"function ruleExists(name) {\n  var rules = $.fn.form.settings && $.fn.form.settings.rules;\n  return !!rules && typeof rules[name] === 'function';\n}\nObject.keys(formConfig.fields).forEach(function(id){\n  formConfig.fields[id].rules.forEach(function(r){\n    if (!ruleExists(r.type.replace(/\\[.*\\]$/, ''))) {\n      console.error('Unknown validation rule:', r.type, 'on field', id);\n    }\n  });\n});","typeGuard":"function isRegisteredRule(name) {\n  var rules = $.fn.form.settings && $.fn.form.settings.rules;\n  return !!(rules && Object.prototype.hasOwnProperty.call(rules, name) && typeof rules[name] === 'function');\n}","tryCatchPattern":null,"preventionTips":["Register custom rules before referencing them in field config.","Cross-check rule type strings against $.fn.form.settings.rules keys.","Strip the [n] suffix when looking up rule functions."],"tags":["form-validation","semantic-ui","rule-not-found","configuration"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}