mihirgokani007 / nconf-validator

Validation plugin for nconf
MIT License
4 stars 2 forks source link

Throws an exception if a validation rule uses an undefined property #1

Open frankandrobot opened 8 years ago

frankandrobot commented 8 years ago

Steps to reproduce:

  1. Create an empty configuration. Example:

nconf('empty file'));

  1. Define validation rules.
  2. Call validate on the empty configuration

Results:

<error: TypeError: Cannot read property 'length' of undefined>
frankandrobot commented 8 years ago

Created a PR for this: https://github.com/mihirgokani007/nconf-validator/pull/2

Please merge or let me know if you no longer wish to maintain this project