Validator.validate()

Expand the validation of other machines

Give you the power to add custom validation to the inputs, by adding new rules

Usage

Hover over inputs/exits for more info.

var Validator = require('machinepack-extend-validator');


// Expand the validation of other machines

Validator.validate({

inputs: {},

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

inputs required

Inputs of the machine you want to expand its validation

{}

Exits

error

An unexpected error occurred.

success

OK.