Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/dummy/app/templates/demos/validation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

<hr/>

<p>The ember-cli-dynamic-forms addon provides you with a way to define and apply reusable validations to your dynamic forms. All you have to do is drop a JavaScript file in the <code>/app/forms/validations</code> directory and its made available to your form as a validator, which can be applied to a form field, as it is updated.</p>
<p>The ember-cli-dynamic-forms addon provides you with a way to define and apply reusable validations to your dynamic forms. All you have to do is drop a JavaScript file in the <code>/app/dynamic-forms/validations</code> directory and its made available to your form as a validator, which can be applied to a form field, as it is updated.</p>
<p>Start by creating a custom validation using the ember-cli validation blueprint generate command:</p>

<p><code>ember g dynamic-form-validator drinking-age</code> ... which will generate the file <code>/app/dynamic-forms/validation/drinking-age.js</code></p>
<p><code>ember g dynamic-form-validator drinking-age</code> ... which will generate the file <code>/app/dynamic-forms/validations/drinking-age.js</code></p>

<p>Now, validate that the age provided is appropriate when beer is selected:</p>

{{#highlight-js}}
<pre>/app/forms/validations/drinking-age.js<code>import Ember from 'ember';
<pre>/app/dynamic-forms/validations/drinking-age.js<code>import Ember from 'ember';

export default Ember.Object.extend({

Expand Down