mastercheck
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -40,3 +40,4 @@ /** | ||
* min: 0, // Minimum value check. | ||
* max: 10 // Maximum value check. | ||
* max: 10, // Maximum value check. | ||
* select: [ 1, 3, 7 ], // Select match check. Default do not check. | ||
* }; | ||
@@ -62,2 +63,5 @@ */ | ||
} | ||
if (this.option.hasOwnProperty('select') && !~this.option.select.indexOf(data)) { | ||
return data + ' should match ' + this.option.select.join(' or '); | ||
} | ||
}; | ||
@@ -75,2 +79,3 @@ }, | ||
* match: /^apple_/, // String match check. Value to use for the String#match. Default do not check. | ||
* select: [ 'apple_a1', 'apple_b2', 'apple_c3' ], // Select match check. Default do not check. | ||
* }; | ||
@@ -77,0 +82,0 @@ */ |
{ | ||
"name": "mastercheck", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "mastercheck", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -62,3 +62,3 @@ MasterCheck | ||
``` | ||
// For numeric values of 0-10. | ||
// For a number values of 0-10. | ||
mastercheck.format('Number', { | ||
@@ -69,2 +69,8 @@ required: true, // Existence check. Default do not check. | ||
}); | ||
// For a number of any in [1, 3, 5]. | ||
mastercheck.format('String', { | ||
required: true, // Existence check. Default do not check. | ||
select: [ 1, 3, 5 ] // Number match check. Default do not check. | ||
}); | ||
``` | ||
@@ -71,0 +77,0 @@ #### MasterCheck.String |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34050
627
135