Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkingshott committed Apr 26, 2020
1 parent 010b361 commit a669996
Show file tree
Hide file tree
Showing 8 changed files with 419 additions and 428 deletions.
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,35 +136,35 @@ Iodine.setErrorMessages({ same: `Champ doit être '[PARAM]'` }); // French

The following validation rules are available:

| Rule | Description |
| Rule | Description |
| ----------------------------- | ------------------------------------------------------------------------------- |
| isAfter(date/integer) | Verify that the item is a `Date` after a given `Date` or timestamp
| isAfterOrEqual(date/integer) | Verify that the item is a `Date` after or equal to a given `Date` or timestamp
| isArray | Verify that the item is an `array`
| isBefore(date/integer) | Verify that the item is a `Date` before a given `Date` or timestamp
| isAfter(date/integer) | Verify that the item is a `Date` after a given `Date` or timestamp
| isAfterOrEqual(date/integer) | Verify that the item is a `Date` after or equal to a given `Date` or timestamp
| isArray | Verify that the item is an `array`
| isBefore(date/integer) | Verify that the item is a `Date` before a given `Date` or timestamp
| isBeforeOrEqual(date/integer) | Verify that the item is a `Date` before or equal to a given `Date` or timestamp
| isBoolean | Verify that the item is either `true` or `false`
| isDate | Verify that the item is a `Date` object
| isDifferent(value) | Verify that the item is different to the supplied value (uses loose compare)
| isEndingWith(value) | Verify that the item ends with the given value
| isEmail | Verify that the item is a valid email address
| isFalsy | Verify that the item is either `false`, `'false'`, `0` or `'0'`
| isIn(array) | Verify that the item is within the given `array`
| isInteger | Verify that the item is an `integer`
| isJson | Verify that the item is a parsable JSON object `string`
| isMaximum(limit) | Verify that the item does not exceed the given limit (number or char length)
| isMinimum(limit) | Verify that the item is not under the given limit (number or char length)
| isNotIn(array) | Verify that the item is not within the given `array`
| isNumeric | Verify that the item is `number` or a numeric `string`
| isOptional | Allow for optional values (only for use with multiple checks)
| isRegexMatch(exp) | Verify that the item satisifies the given regular expression
| isRequired | Verify that the item is not `null`, `undefined` or an empty `string`
| isSame(value) | Verify that the item is the same as the supplied value (uses loose compare)
| isStartingWith(value) | Verify that the item starts with the given value
| isString | Verify that the item is a `string`
| isTruthy | Verify that the item is either `true`, `'true'`, `1` or `'1'`
| isUrl | Verify that the item is a valid URL
| isUuid | Verify that the item is a `UUID`
| isBoolean | Verify that the item is either `true` or `false`
| isDate | Verify that the item is a `Date` object
| isDifferent(value) | Verify that the item is different to the supplied value (uses loose compare)
| isEndingWith(value) | Verify that the item ends with the given value
| isEmail | Verify that the item is a valid email address
| isFalsy | Verify that the item is either `false`, `'false'`, `0` or `'0'`
| isIn(array) | Verify that the item is within the given `array`
| isInteger | Verify that the item is an `integer`
| isJson | Verify that the item is a parsable JSON object `string`
| isMaximum(limit) | Verify that the item does not exceed the given limit (number or char length)
| isMinimum(limit) | Verify that the item is not under the given limit (number or char length)
| isNotIn(array) | Verify that the item is not within the given `array`
| isNumeric | Verify that the item is `number` or a numeric `string`
| isOptional | Allow for optional values (only for use with multiple checks)
| isRegexMatch(exp) | Verify that the item satisifies the given regular expression
| isRequired | Verify that the item is not `null`, `undefined` or an empty `string`
| isSame(value) | Verify that the item is the same as the supplied value (uses loose compare)
| isStartingWith(value) | Verify that the item starts with the given value
| isString | Verify that the item is a `string`
| isTruthy | Verify that the item is either `true`, `'true'`, `1` or `'1'`
| isUrl | Verify that the item is a valid URL
| isUuid | Verify that the item is a `UUID`

Examine the tests for examples of how to use each rule.

Expand Down
2 changes: 1 addition & 1 deletion dist/iodine.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/iodine.min.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/iodine.min.umd.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "@kingshott/iodine",
"version": "3.0.2",
"version": "3.0.3",
"description": "A micro client-side validation library",
"repository": {
"type": "git",
"url": "https://github.com/mattkingshott/iodine.git"
},
"keywords": [
"keywords": [
"iodine",
"validation",
"data",
"micro"
],
"scripts": {
"build": "microbundle",
"watch": "microbundle watch",
"watch": "microbundle watch",
"test": "jest"
},
"main": "dist/iodine.min.js",
Expand Down
4 changes: 2 additions & 2 deletions resources/version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a669996

Please sign in to comment.