💼 This rule is enabled in the 📋 template-lint-migration config.
Disallow click action on submit buttons within a form.
In a <form>, all <button> elements with a type="submit" attribute (or no type, since buttons default to type="submit") should not have any click action. The action should be on the <form> element instead of directly on the button.
This rule disallows:
- Using
{{action}}or{{on "click"}}modifiers on submit buttons inside a<form>. - Using the HTML
actionattribute on submit buttons or<input type="submit">elements.
Buttons outside a <form> are allowed to have click actions: