0.7.1 • Published 8 years ago

ember-cli-validation-components v0.7.1

Weekly downloads
25
License
MIT
Repository
github
Last release
8 years ago

Ember-cli-validation-components

Easy to use input components to manage all your form validation needs

Build Status npm version Code Climate

This ember-cli addon provides four validated input components input, input-mask, select and checkbox plus a service with several convenience functions to your app. These easy to use components make form validation easy and dare I say almost fun.

How Easy Is It?

This:

// controllers/index.js
form: Ember.A([
  {_id: "name", regex: /^[A-Za-z]+$/},
  {_id: "pin" , regex: /^\d{4}$/}
])

Plus this:

<!-- templates/index.hbs -->
{{#validated-input _id="name" formFields=form contentPosition="after" placeholder="Name"}}
  <div style="color:red">Only alpha chars</div>
{{/validated-input}}

{{#validated-input _id="pin" formFields=form contentPosition="after" placeholder="Pin Number"}}
  <div style="color:red">Pin is a four digit number</div>
{{/validated-input}}

Gives you this:

validation

Sign Me Up Already! (Installation)

NOTE: This add requires Ember version 1.13.1 or higher.

ember install ember-cli-validation-components

Service Injection

Injecting the service can be accomplished with a single line.

formValidator: Ember.inject.service()

The Details

Component Examples

Form Validation Functions

Custom Field Validators (Other than regex)

0.7.1

8 years ago

0.7.0

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.5

8 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago