Closed toranb closed 10 years ago
Hey, thank you for the kind words,
for q 1) Sure it can, it has nothing to do with ember-data, as long as your model bound to the form is an ember object.
For q 2) you don't need all of these observers, u can replace this boilerplate code with a simple validations on the controller level and template should be only what u wrote,
Let me just update the docs with example that put the validations on the controller and not on the model,
I'm keeping this open for now
I actually like the model backed form - I just couldn't figure out how to use it with my simple example. Maybe I'm just missing a slightly more detailed example app - I'd gladly push what I have into an example repo for others (after we refactor it with your help and this wonderful library)
@toranb you can create a jsbin if you want
Finally got it working :)
@toranb i also have the same problem with bounding the form and the model for the validation to get work... may i know how to solve it?
I put together an example app a while back but I'm not sure how recent it is :)
https://github.com/toranb/ember-form-example/commits/master
Later I ended up writing my own validation library for this form validation logic (the only diff is you write the form input /html yourself)
Thanks for an amazingly helpful/well documented project! keep up the great work!
2 questions
1.) if I only have a basic ember object (no ember-data) will this work? 2.) how do I inject a simple "model" and use the markup for this very simple app?
https://github.com/toranb/ember-form-example
the controller is here
https://github.com/toranb/ember-form-example/blob/master/js/app/controllers/people.js
the hbs is here
https://github.com/toranb/ember-form-example/blob/master/js/templates/people.handlebars
I believe the refactor will remove almost all of this code (I'd like to see the diff but I found the markup I'm using /below isn't working for that model. Do I need a route to "new up" this model? if not how will this library know what model goes w/ my controller?)