keithwhor / nodal

API Services Made Easy With Node.js
http://www.nodaljs.com/
MIT License
4.51k stars 210 forks source link

How to perform async validation on Nodal.model? #208

Closed tilap closed 8 years ago

tilap commented 8 years ago

__validate__ method for Nodel.model perform a loop on sync function

However, I want to check if a model object property is not already used (example: a user email) and get some info from a remote service. So I need to query the database/fetch data from other service in async way. How can I do that?

keithwhor commented 8 years ago

You can't currently. I'll put it on the roadmap. :)

keithwhor commented 8 years ago

This is in! As of 0.10 :)

http://www.nodaljs.com/devlogs/nodal-0-10-landed--async-validations--file-uploads