TryGhost/Ghost — pull request #3011 by darvelo (2014-06-20 21:38:52+00:00)
Title: Add Validations Layer and Post Validations

closes #2893, issue #2850, issue #2856
- this is a stable, but quick and dirty validations layer for the time constraints
- this could be replaced with a unified server/client layer later. the infrastructure is there.
- create a validation engine mixin to match validators with models
- create a post validator
- override the save method on the Post model to perform validations first
- fixup calls to .save() to make sure they catch errors properly