mozilla-sensorweb / sensorweb-server

Mozilla Public License 2.0
3 stars 6 forks source link

Use ValidatorJS's documented API instead of Sequelize monkey-patched … #51

Closed julienw closed 7 years ago

julienw commented 7 years ago

…version

julienw commented 7 years ago

@ferjm r?

The trick here is that it sometimes works depending on your node_modules state. For me it wasn't working anymore after working for a few days (maybe because I installed a newer validatorjs at one point while working on my patch, and node wasn't loading the modules the same way).

From https://github.com/sequelize/sequelize/blob/2f8930f84837722f5a6e2f288a3a20dcaf247d4e/lib/utils/validator-extras.js#L18-L20 sequelize is monkey-patching validatorjs, and so the behavior seems to depend on the order of something...

julienw commented 7 years ago

ValidatorJS documentation: https://github.com/chriso/validator.js#validators

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 86.434% when pulling c54c3d3451bb33f1e7407cb4bc87df5fc64b0de0 on julienw:isUrl-fix into e92fe347bce7e7307c73e59df0b16247f2d8d1b6 on mozilla-sensorweb:master.