couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulises <>
Subject Re: Config Validators
Date Tue, 13 Jan 2009 18:48:57 GMT
> And I choose a slightly modified form of 2, but have the config module
> call each registered validator immediately and then close things down
> if one fails.

The problem is that validators are registered asynchronously so, from
the config's point of view, you can't be sure you've ran them all once
you're done loading the config. From the module's point of view,
however, once you start pulling values out of the config you know
they've been loaded. I think that checking that a value is valid in
the init() of a module might be a better approach.

Generally, though, does this whole validators thingie make sense?


View raw message