{"record":{"id":"20e477965339e4a2","repo":"Semantic-Org/Semantic-UI","slug":"starting-in-2-0-forms-now-only-take-a-single-setti","errorCode":null,"errorMessage":"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.","messagePattern":"Starting in 2\\.0 forms now only take a single settings object\\. Validation settings converted to new syntax automatically\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/definitions/behaviors/form.js","lineNumber":1308,"sourceCode":"    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\n    prompt: function(errors) {","sourceCodeStart":1290,"sourceCodeEnd":1326,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/behaviors/form.js#L1290-L1326","documentation":"A migration/deprecation notice logged by Semantic UI Form when it detects the legacy 1.x positional settings shape (an array of objects each with {identifier, rules}). The form behavior auto-converts the legacy parameters into the 2.x single settings object and emits this message via module.error(settings.error.oldSyntax, element) at form.js:479.","triggerScenarios":"Calling $('.ui.form').form(legacyArray, settingsObj) with two positional args where the first is the old per-field rules array. The duck-type check (form.js:470-471) keys off {identifier, rules} on the first element and triggers conversion.","commonSituations":"Copying example code from old Semantic UI 1.x blog posts/docs; upgrading Semantic UI without updating form init calls; CMS templates that ship legacy form snippets.","solutions":["Migrate to the 2.x single-settings object: $('.ui.form').form({ fields: { ... } }).","Move per-field rules under the 'fields' key in the settings object.","Stop passing two positional arguments; merge callbacks and rules into one options object."],"exampleFix":"// before (1.x)\n$('.ui.form').form([\n  { identifier: 'email', rules: [{ type: 'empty', prompt: 'Required' }] }\n], { inline: true });\n// after (2.x)\n$('.ui.form').form({\n  inline: true,\n  fields: { email: { rules: [{ type: 'empty', prompt: 'Required' }] } }\n});","handlingStrategy":"validation","validationCode":"function isLegacyFormArgs(args) {\n  return Array.isArray(args[0]) || (args[0] && args[0].length && args[0][0] && args[0][0].identifier && args[0][0].rules);\n}\n// before init:\nif (isLegacyFormArgs(arguments)) { console.warn('Migrate to 2.x single-settings form() call'); }","typeGuard":"function isModernSettings(obj) {\n  return obj && typeof obj === 'object' && !Array.isArray(obj) && ('fields' in obj || 'on' in obj || 'inline' in obj);\n}","tryCatchPattern":null,"preventionTips":["Always pass a single options object to .form().","Run a code search for '.form([' to catch legacy patterns during upgrades.","Update CMS/legacy templates when bumping Semantic UI major versions."],"tags":["semantic-ui","deprecation","migration","form-validation"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}