Skip to content

Commit 3a8ed29

Browse files
authored
Merge pull request #31 from kaliber5/readme
Update Readme
2 parents 0503124 + 6bdb7ec commit 3a8ed29

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[![Build Status](https://travis-ci.org/kaliber5/ember-bootstrap-changeset-validations.svg?branch=master)](https://travis-ci.org/kaliber5/ember-bootstrap-changeset-validations)
44

5-
This Ember addon adds support for validations based on [ember-changeset](https://github.com/poteto/ember-changeset) to [ember-bootstrap](http://kaliber5.github.io/ember-bootstrap/) forms.
5+
This Ember addon adds support for validations based on [ember-changeset](https://github.com/poteto/ember-changeset) to [ember-bootstrap](https://www.ember-bootstrap.com/) forms.
66
This way your forms are only submitted when the underlying data is valid, otherwise the appropriate bootstrap error
7-
markup will be applied. See the [FormElement documentation](http://kaliber5.github.io/ember-bootstrap/api/classes/Components.FormElement.html) for
7+
markup will be applied. See the [FormElement documentation](https://www.ember-bootstrap.com/api/classes/Components.FormElement.html) for
88
further details.
99

1010
Compatibility
@@ -36,27 +36,24 @@ if you do not have a custom validation implementation:
3636
ember install ember-changeset-validations
3737
```
3838

39-
If using ember-bootstrap 1.0 (alpha), install the corresponding version of this addon:
40-
41-
ember install [email protected]
42-
4339
## Usage
4440

4541
Define your model and its validations as described in [ember-changeset-validations](https://github.com/poteto/ember-changeset-validations/).
4642
Then assign the changeset based on that to your form:
4743

4844
```hbs
49-
{{#bs-form model=(changeset user userValidations)}}
50-
{{bs-form-element label="Username" controlType="text" property="username" required=true}}
51-
{{bs-form-element label="Email" controlType="email" property="email" required=true}}
52-
{{bs-form-element label="Password" controlType="password" property="password" required=true}}
53-
{{bs-button defaultText="Submit" type="primary" buttonType="submit"}}
54-
{{/bs-form}}
45+
<BsForm @model={{changeset this.user this.userValidations}} as |form|>
46+
<form.element @label="Username" @controlType="text" @property="username" />
47+
<form.element @label="Email" @controlType="email" @property="email" />
48+
<form.element @label="Password" @controlType="password" @property="password" />
49+
<form.submitButton>Submit</form.submitButton>
50+
</BsForm>
5551
```
5652

5753
## Authors
5854

59-
[Simon Ihmig](https://github.com/simonihmig) @ [kaliber5](http://www.kaliber5.de)
55+
* [Simon Ihmig](https://github.com/simonihmig) @ [kaliber5](http://www.kaliber5.de)
56+
* [Jeldrik Hanschke](https://github.com/jelhan)
6057

6158

6259
Contributing
@@ -66,4 +63,4 @@ See the [Contributing](CONTRIBUTING.md) guide for details.
6663

6764
## Copyright and license
6865

69-
Code and documentation copyright 2017 kaliber5 GmbH. Code released under [the MIT license](LICENSE.md).
66+
Code and documentation copyright 2017 kaliber5 GmbH and contributors. Code released under [the MIT license](LICENSE.md).

0 commit comments

Comments
 (0)