Generalhenry on Stackoverflow pointed me at
https://github.com/caolan/forms,
which looks just the job. I'll give it a run over the next few days
and write a review.
There are reasons why forms should be only loosely coupled to models.
Authorisation is the first which comes to mind: an accounting model
may accept credit notes and invoices in a transaction model, but only
supervisors can create credit notes...
All the best,
Chris.
On Apr 5, 6:10 pm, TJ Holowaychuk <
tjholoway...@gmail.com> wrote:
> IMO most of this should be at the model level, so something
> like mongoose would provide validations, you run them and display
> the errors if any. on POST you can use express-messages / req.flash('error', msg)
> to populate these as one solution
>
> --
> TJ Holowaychuk
>
>
>
>
>
>
>
> On Tuesday, April 5, 2011 at 9:23 AM, Chris Dew wrote:
> > I know this has been asked before...
> >
http://groups.google.com/group/express-js/browse_thread/thread/d402f3...
> > ...but perhaps there is a more recent answer?
>
> > Cross-posted tohttp://
stackoverflow.com/questions/5555053/how-to-validate-and-handle...