Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "satpam", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Simple and Effective Object Validator", | ||
@@ -34,8 +34,8 @@ "main": "lib/index.js", | ||
"babel-core": "^6.6.4", | ||
"babel-eslint": "^5.0.0", | ||
"babel-eslint": "^6.0.2", | ||
"babel-preset-es2015": "^6.6.0", | ||
"chai": "^2.3.0", | ||
"eslint": "^2.2.0", | ||
"eslint": "^2.5.1", | ||
"mocha": "^2.2.4" | ||
} | ||
} |
@@ -56,4 +56,3 @@ # Satpam | ||
``` | ||
```js | ||
import satpam from 'satpam'; | ||
@@ -93,3 +92,3 @@ | ||
``` | ||
```js | ||
var input = {message: 'hi!'}; | ||
@@ -148,9 +147,12 @@ // `subject` is required if message equals `hi!` | ||
```js | ||
satpam.setValidationMessage( | ||
'minLength:$1', | ||
'<%= propertyName %> must have length more than <%= ruleParams[0] %>' | ||
); | ||
``` | ||
satpam.setValidationMessage('minLength:$1', '<%= propertyName %> must have length more than <%= ruleParams[0] %>'); | ||
``` | ||
You can also pass a `Function` instead of a `String` | ||
``` | ||
```js | ||
/** | ||
@@ -157,0 +159,0 @@ * @example |
118561
202