nodejs-model
nodejs-model copied to clipboard
Super Lightweight & extensible Models for validations, accessibility, filtering, convertions and sanitization for Node.js
Please update your dependencies for validator and underscore.string because they are flagged as high security risk
Fix code sample
Took a minute to figure out why I couldn't get validations working based on the sample, but it looks like the sample code has a bug with the validation promise....
How do I deal with the case where I want to do something asynchronously in my `model.init` function? For instance: ``` javascript myModel.init = function(instance){ exec('ls -l',function(err,stdout,stderr){ //error checking etc...
Need help with this validator function.. ``` //Invoke validations and wait for the validations to fulfill u1.validate(function() { if u1.isValid { //validated, perform business logic } else { //validation failed,...
# Inclusion validator Define a list of allowed values. ## Validator options: **message**: Override default validator message. **allowBlank**: if true validation will be skipped for empty value. **range**: An array...