Eric Polerecky bio photo

Director, Professional Services @RightBrain_Net - 50% engineer, 50% entrepreneur. Former: CTO @Wantify, @agilesoftware, @grasshopper

Eric Polerecky

Email Twitter LinkedIn Github Stackoverflow

Certifications

Xamarin (expired)

Speaking

Microservices? Real World FRP Xamarin Forms Case Study

All Posts

All Posts

The MEAN stack ties client side models – angular form posts – with Mongoose models. What happens when the data posted to the server is not going to be persisted?

What are other validation/model frameworks embraced by the community?

I think I’ll be working the domain logic in my MEAN stack template to take a DDD approach to validation. 

Action Items

  1. Remove coupling between Mongoose and validation
  2. Allow validation on non-persisted objects
  3. Create validation rules for complex scenarios (non-crud)

Potential Validation Tools

  1. express-form: https://github.com/freewil/express-form
  2. nodejs-model: https://npmjs.org/package/nodejs-model

I am going to start my review with nodejs-model. I don’t think validation should be tied to our stack. If we move from express to hapi or koa we should not have to recreate our validation rules.