1 | ;
|
2 | var util = require('util')
|
3 | /**
|
4 | * Object Manage Validate Instance
|
5 | * @param verb
|
6 | * @param message
|
7 | * @param path
|
8 | * @param value
|
9 | * @constructor
|
10 | */
|
11 | var Validate = function(verb,message,path,value){
|
12 | Error.call(this)
|
13 | this.message = message
|
14 | this.verb = verb
|
15 | this.path = path
|
16 | this.value = value
|
17 | }
|
18 | //inherit Error prototype
|
19 | util.inherits(Validate,Error)
|
20 | /**
|
21 | * Verb to handle the validation call
|
22 | * @type {null}
|
23 | */
|
24 | Validate.prototype.verb = null
|
25 | /**
|
26 | * Path being operated on
|
27 | * @type {null}
|
28 | */
|
29 | Validate.prototype.path = null
|
30 | /**
|
31 | * Value of the call be validated
|
32 | * @type {undefined}
|
33 | */
|
34 | Validate.prototype.value = undefined
|
35 |
|
36 | module.exports = exports = Validate |
\ | No newline at end of file |