@updog/data-editor-wc 0.1.59 → 0.1.60
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.
- package/README.md +3 -3
- package/index.css +1 -1
- package/index.d.ts +36 -9
- package/index.js +4286 -3740
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -216,11 +216,10 @@ editor.columns = [
|
|
|
216
216
|
validators: [
|
|
217
217
|
{ type: "required", message: "Email is required" },
|
|
218
218
|
{ type: "email", message: "Enter a valid email" },
|
|
219
|
+
// Flag duplicates in this column as errors. Always checked last.
|
|
220
|
+
{ type: "unique" },
|
|
219
221
|
],
|
|
220
222
|
|
|
221
|
-
// Flag duplicates in this column as errors.
|
|
222
|
-
unique: true,
|
|
223
|
-
|
|
224
223
|
// Revalidate these columns when this one changes.
|
|
225
224
|
dependentFields: ["confirmEmail"],
|
|
226
225
|
|
|
@@ -262,6 +261,7 @@ Validators are declarative objects passed in the `validators` array on each colu
|
|
|
262
261
|
| `"range"` | `min?`, `max?`, `message?` | Value must be numerically within `[min, max]`. Either bound is optional. |
|
|
263
262
|
| `"oneOf"` | `values: string[]`, `message?` | Value must be one of the listed strings. |
|
|
264
263
|
| `"date"` | `format?: "YYYY-MM-DD" \| "DD/MM/YYYY"`, `message?` | Value must parse as a date in the given format. When `format` is omitted, either format is accepted. |
|
|
264
|
+
| `"unique"` | `message?` | Value must not appear in any other row of the column. Always checked last, after all other validators pass — list position is ignored. |
|
|
265
265
|
|
|
266
266
|
```js
|
|
267
267
|
editor.columns = [
|