0.0.7 • Published 10 years ago

domain-validation v0.0.7

Weekly downloads
33
License
-
Repository
bitbucket
Last release
10 years ago

#OBJECTIVE:# Helper Module for Object Validation

#DESCRIPTION:
With this module you can create object scheme for object and validate it.

When the validation fails the module throws ArgumentError.

#INSTALLATION

npm install domain-validation

#USEAGE EXAMPLE#

validator.validate(smsOptions, {
        phone: {
            required: 'please add phone number',
            numericString: 'this field must be numbers'
        },
        text: {
            required: 'please add text'
        }
    });

VALIDATORS

	required: ERROR_MESSAGE
	numericString: ERROR_MESSAGE
	email: ERROR_MESSAGE
	numric: ERROR_MESSAGE
	ip: ERROR_MESSAGE
	any: 
              options: ['array', 'of', 'options']
              msg: ERROR_MESSAGE
0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago