@jdlien/validator 1.1.7 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,7 +28,7 @@ Validator includes the following built-in validation types:
28
28
 
29
29
  You can also add custom validation, and can customize error messages per field or for the whole form.
30
30
 
31
- Validator has no dependencies and is written in TypeScript. It is compatible with all modern browsers.
31
+ Validator is compatible with all modern browsers. It has no dependencies (other than its validator-utils package). It is written in TypeScript with 100% test coverage.
32
32
 
33
33
  ## Installation
34
34
 
@@ -89,7 +89,7 @@ You can also pass in a custom default error message for a field using `data-erro
89
89
 
90
90
  ## Demo
91
91
 
92
- [Working demo](https://jdlien.com/validator/demo.html) [source on GitHub](./demo.html).
92
+ [Working demo on jdlien.com](https://jdlien.com/validator/demo/).
93
93
 
94
94
  ## Supported Input Types and Atributes
95
95
 
@@ -243,13 +243,15 @@ const myValidator = new Validator(myForm, {
243
243
 
244
244
  ## Utility Functions
245
245
 
246
- Validator includes several utility functions that may be useful in your own code, so they are exported as part of the module.
246
+ Validator uses its own `@jdlien/validator-utils` for several utility functions that may be useful in your own code. You may use this package directly if you need any of these functions without using the Validator class.
247
+
247
248
  If you wish to use these, you may import the functions directly from the module as an object that contains all the functions:
248
249
 
249
250
  ```javascript
250
- import { validatorUtils } from '@jdlien/validator'
251
- // you could assign the functions you need to more convenient variables
252
- const { dateFormat, formatDateTime } = validatorUtils
251
+ // Import all the functions into a validatorUtils object
252
+ import * as validatorUtils from '@jdlien/validator-utils'
253
+ // Or just import the functions you need
254
+ import { dateFormat, formatDateTime } from '@jdlien/validator-utils'
253
255
  ```
254
256
 
255
257
  Here is a list of the utility functions:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdlien/validator",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "module": "dist/validator.js",
6
6
  "types": "dist/Validator.d.ts",