@live-change/frontend-auto-form 0.8.143 → 0.8.144
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.
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</slot>
|
|
18
18
|
<div>
|
|
19
19
|
<slot name="error" v-bind="{ validationResult, uid }" >
|
|
20
|
-
<small v-if="validationResult" class="p-error mt-1">
|
|
20
|
+
<small v-if="validationResult && !minLengthErrorVisible" class="p-error mt-1">
|
|
21
21
|
{{ (typeof validationResult === 'object')
|
|
22
22
|
? t( 'errors.' + validationResult.error, validationResult.validator )
|
|
23
23
|
: t( 'errors.' + validationResult ) }}
|
|
@@ -25,13 +25,10 @@
|
|
|
25
25
|
</slot>
|
|
26
26
|
<small v-if="maxLengthValidation || minLengthValidation" style="float: right" class="mt-1"
|
|
27
27
|
:class="{
|
|
28
|
-
'p-error':
|
|
29
|
-
&& props.modelValue?.length > maxLengthValidation.length)
|
|
30
|
-
|| (minLengthValidation && props.modelValue?.length
|
|
31
|
-
&& props.modelValue?.length < minLengthValidation.length)
|
|
28
|
+
'p-error': minMaxError
|
|
32
29
|
}">
|
|
33
30
|
{{
|
|
34
|
-
(
|
|
31
|
+
(minLengthErrorVisible)
|
|
35
32
|
? t( 'info.minLength', { minLength: minLengthValidation.length, length: props.modelValue?.length ?? 0 })
|
|
36
33
|
: t( 'info.maxLength', { maxLength: maxLengthValidation.length, length: props.modelValue?.length ?? 0 })
|
|
37
34
|
}}
|
|
@@ -147,6 +144,18 @@
|
|
|
147
144
|
const maxLengthValidation = computed(() => findValidation('maxLength'))
|
|
148
145
|
const minLengthValidation = computed(() => findValidation('minLength'))
|
|
149
146
|
|
|
147
|
+
const minMaxError = computed(() =>
|
|
148
|
+
(maxLengthValidation.value && props.modelValue?.length
|
|
149
|
+
&& props.modelValue?.length > maxLengthValidation.value.length)
|
|
150
|
+
|| (minLengthValidation.value && props.modelValue?.length
|
|
151
|
+
&& props.modelValue?.length < minLengthValidation.value.length)
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
const minLengthErrorVisible = computed(() =>
|
|
155
|
+
minLengthValidation.value && props.modelValue?.length
|
|
156
|
+
&& props.modelValue?.length < minLengthValidation.value.length
|
|
157
|
+
)
|
|
158
|
+
|
|
150
159
|
const config = inject('auto-form', {
|
|
151
160
|
inputs: {},
|
|
152
161
|
types: {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/frontend-auto-form",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.144",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
25
|
-
"@live-change/cli": "^0.8.
|
|
26
|
-
"@live-change/dao": "^0.8.
|
|
27
|
-
"@live-change/dao-vue3": "^0.8.
|
|
28
|
-
"@live-change/dao-websocket": "^0.8.
|
|
29
|
-
"@live-change/framework": "^0.8.
|
|
30
|
-
"@live-change/image-frontend": "^0.8.
|
|
31
|
-
"@live-change/image-service": "^0.8.
|
|
32
|
-
"@live-change/session-service": "^0.8.
|
|
33
|
-
"@live-change/vue3-components": "^0.8.
|
|
34
|
-
"@live-change/vue3-ssr": "^0.8.
|
|
25
|
+
"@live-change/cli": "^0.8.144",
|
|
26
|
+
"@live-change/dao": "^0.8.144",
|
|
27
|
+
"@live-change/dao-vue3": "^0.8.144",
|
|
28
|
+
"@live-change/dao-websocket": "^0.8.144",
|
|
29
|
+
"@live-change/framework": "^0.8.144",
|
|
30
|
+
"@live-change/image-frontend": "^0.8.144",
|
|
31
|
+
"@live-change/image-service": "^0.8.144",
|
|
32
|
+
"@live-change/session-service": "^0.8.144",
|
|
33
|
+
"@live-change/vue3-components": "^0.8.144",
|
|
34
|
+
"@live-change/vue3-ssr": "^0.8.144",
|
|
35
35
|
"@vueuse/core": "^10.11.0",
|
|
36
36
|
"codeceptjs-assert": "^0.0.5",
|
|
37
37
|
"compression": "^1.7.4",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"vue3-scroll-border": "0.1.6"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@live-change/codeceptjs-helper": "^0.8.
|
|
55
|
+
"@live-change/codeceptjs-helper": "^0.8.144",
|
|
56
56
|
"codeceptjs": "^3.6.5",
|
|
57
57
|
"generate-password": "1.7.1",
|
|
58
58
|
"playwright": "^1.41.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
64
64
|
"license": "ISC",
|
|
65
65
|
"description": "",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "cea115baa7d457fa6e3865d025662b1e11b15aac"
|
|
67
67
|
}
|