@d-mok/quasar-app-extension-quasar-axe 3.1.40 → 3.1.41
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/package.json
CHANGED
|
@@ -122,30 +122,24 @@ const EmptySchema = v.object(
|
|
|
122
122
|
})
|
|
123
123
|
)
|
|
124
124
|
|
|
125
|
-
function checkSpec(row: any): boolean {
|
|
126
|
-
return v.is(v.union([StandardSchema, EmptySchema]), row)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
125
|
function err(): string | false {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
126
|
+
let rows = dummy.value
|
|
127
|
+
|
|
128
|
+
for (let i = 0; i < rows.length; i++) {
|
|
129
|
+
let row = rows[i]
|
|
130
|
+
if (v.is(EmptySchema, row)) continue
|
|
131
|
+
|
|
132
|
+
if (!v.is(StandardSchema, row)) {
|
|
133
|
+
return `row ${i + 1} required format:<br/>` + JSON.stringify(sample)
|
|
138
134
|
}
|
|
139
|
-
|
|
140
|
-
for (let i = 0; i < dummy.value.length; i++) {
|
|
135
|
+
|
|
141
136
|
for (let [f, msg] of validators) {
|
|
142
|
-
if (!f(
|
|
143
|
-
return [`row ${i + 1}:`, msg].join('<br>')
|
|
144
|
-
}
|
|
137
|
+
if (!f(row)) return `row ${i + 1}:<br/>` + msg
|
|
145
138
|
}
|
|
146
139
|
}
|
|
140
|
+
|
|
147
141
|
for (let [f, msg] of arrayValidators) {
|
|
148
|
-
if (!f(
|
|
142
|
+
if (!f(filterBlank(rows))) {
|
|
149
143
|
return msg
|
|
150
144
|
}
|
|
151
145
|
}
|