nearinfinity/node-persist — pull request #90 by peruzzo (2013-09-13 19:01:54+00:00)
Title: Added instance methods to model and modified model validation

I ended up making two changes in this pull request.

1) Added a setting in the configuration model that accepts methods instance, I needed to customize the toJSON for all my models, using the onLoad method I could not do in the instance where it was used the new.

2) modified the validation method to pass as argument the connection, enabling more complex validations do. Another change was that if the return message is not a string, its value as the callback object will be returned.