{"record":{"id":"3a10d1125973e3ec","repo":"basecamp/trix","slug":"this-browser-does-not-support-the-willvalidate-pro","errorCode":null,"errorMessage":"This browser does not support the willValidate property for trix-editor elements.","messagePattern":"This browser does not support the willValidate property for trix-editor elements\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/trix/elements/trix_editor_element.js","lineNumber":342,"sourceCode":"  }\n\n  set required(value) {\n    console.warn(\"This browser does not support the [required] attribute for trix-editor elements.\")\n  }\n\n  get validity() {\n    console.warn(\"This browser does not support the validity property for trix-editor elements.\")\n    return null\n  }\n\n  get validationMessage() {\n    console.warn(\"This browser does not support the validationMessage property for trix-editor elements.\")\n\n    return \"\"\n  }\n\n  get willValidate() {\n    console.warn(\"This browser does not support the willValidate property for trix-editor elements.\")\n\n    return false\n  }\n\n  formDisabledCallback(value) {\n  }\n\n  setFormValue(value) {\n  }\n\n  checkValidity() {\n    console.warn(\"This browser does not support checkValidity() for trix-editor elements.\")\n\n    return true\n  }\n\n  reportValidity() {\n    console.warn(\"This browser does not support reportValidity() for trix-editor elements.\")","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/basecamp/trix/blob/470040131122bd44e269b4de0f2e9557f90ec994/src/trix/elements/trix_editor_element.js#L324-L360","documentation":"The willValidate getter is a stub that warns and returns false when the browser does not support form-associated custom elements. Code using willValidate to decide whether to run native validation will skip the trix-editor entirely. Non-fatal console warning.","triggerScenarios":"Reading 'trixEditor.willValidate' in validation pipelines that check whether a control will be natively validated, in unsupported browsers, executing the stub at trix_editor_element.js:341-345.","commonSituations":"Frameworks/libraries that branch on willValidate before calling checkValidity; older Safari/Firefox deployments; progressive-enhancement code paths.","solutions":["Do not rely on willValidate for trix-editor; always run your own validation for its value.","Feature-detect form-associated support and provide custom validation when false.","Skip/accept the warning; returning false safely degrades to 'no native validation'.","Update your browser support baseline to one where willValidate is meaningful."],"exampleFix":"// before\nif (!field.willValidate) return;\nvalidate(field);\n// after\nconst willValidate = field.willValidate ?? field.tagName !== 'TRIX-EDITOR';\nif (!willValidate) validateTrixManually(field); else validate(field);","handlingStrategy":"validation","validationCode":"// do not gate on willValidate for trix-editor:\nif (editor.tagName === 'TRIX-EDITOR' || editor.willValidate) {\n  runValidation(editor);\n}","typeGuard":"function willValidateNatively(el) {\n  return Boolean(el.willValidate) && 'ElementInternals' in window;\n}","tryCatchPattern":"const will = willValidateNatively(editor);\nif (will) { editor.checkValidity(); } else { customValidate(editor); }","preventionTips":["Never use willValidate===false as a reason to skip validating a trix-editor","Run your own validation unconditionally for rich-text editors","Feature-detect ElementInternals at startup and pick a validation strategy","Include legacy-browser form tests in CI"],"tags":["browser-compatibility","custom-elements","validation","console-warning"],"backgroundTag":"form-associated-custom-element-unsupported","analyzedSha":"470040131122bd44e269b4de0f2e9557f90ec994","analyzedAt":"2026-09-02T10:19:15.878Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}