@gavant/ember-template-lint-forms
v0.0.2
Published
Ember handlebars template linter rules for validating form elements
Keywords
Readme
ember-template-lint-forms
Ember handlebars template linter rules for validating form elements. This plugin assumes that your project has ember-template-lint installed.
Installation
yarn add --dev @gavant/ember-template-lint-formsThen update your template-lintrc.js file to contain the following:
module.exports = {
extends: ['recommended', '@gavant/ember-template-lint-forms:forms'],
plugins: ['@gavant/ember-template-lint-forms'],
rules: {
....
}
};Limitations & Caveats
Currently, this plugin only validates that textual input elements (e.g. type="text|password|email|...") have a maxlength attribute defined.
Only native HTML <input> elements and <AngleBracket> invocation style ember components <Input> and <FlInput> (from the ember-floating-labels addon) are validated.
Future Improvements
- [ ] Add more validation rules!
- [ ] Allow customizing what ember components should be validated (e.g.
<MyAwesomeInput>)
