ember-template-lint-forms

0.0.1 • Public • Published

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 ember-template-lint-forms

Then update your template-lintrc.js file to contain the following:

module.exports = {
    extends: ['recommended', 'ember-template-lint-forms:forms'],
    plugins: ['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>)

Readme

Keywords

none

Package Sidebar

Install

npm i ember-template-lint-forms

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

4.64 kB

Total Files

5

Last publish

Collaborators

  • billdami