var testCol = new Meteor.Collection('testcol'); testCol.bindTemplate('hello', { liveUpdate: false, //Liveupdate instead of bindActions update, cancel validation: { name: { validators: [ Validators.required ] //Mulitiple validators allowed }, email: { validators: [ Validators.email ] } } });Some helpers:Show/hide
Bind html element: <textarea rows="3" {{dstache}}bind 'description'}}></textarea> Create, Update, Delete, Upload or Cancel: <a class="btn" {{dstache}}bindAction 'cancel'}}>Cancel</a> File upload: <input type="file" accept="image/*" {{dstache}}bindAction 'upload' 'image' }}> Get validation status: <input {{dstache}}bind 'name'}} placeholder="Name"/>{{dstache}}#if bindStatus 'hello' 'name' 'invalid'}}*{{dstache}}/if}} From the handlebar-helpers package: {{dstache}}#each find 'testCol' '{}'}}Note: "The file uploader lacks some work still - the hard part is getting spark to live update while still preserving the contents of the src in a img or a tag + A validation run at loaded page is to come."
{{name}} {{#with key}} invalid: {{invalid}} error: {{error}} warning: {{warning}} required: {{required}} dirty: {{dirty}} {{/with}} |
{{else}}
No bindStatus | {{/each}}