@live-change/frontend-auto-form 0.8.78 → 0.8.79

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/AutoField.vue +14 -4
  2. package/package.json +13 -13
package/AutoField.vue CHANGED
@@ -19,9 +19,18 @@
19
19
  ? t( 'errors.' + validationResult.error, validationResult.validator )
20
20
  : t( 'errors.' + validationResult ) }}
21
21
  </small>
22
- <small v-if="maxLengthValidation" style="float: right" class="mt-1"
23
- :class="{ 'p-error': props.modelValue?.length > maxLengthValidation.length }">
24
- {{ t( 'info.maxLength', { maxLength: maxLengthValidation.length, length: props.modelValue?.length ?? 0 }) }}
22
+ <small v-if="maxLengthValidation || minLengthValidation" style="float: right" class="mt-1"
23
+ :class="{
24
+ 'p-error': (maxLengthValidation && props.modelValue?.length
25
+ && props.modelValue?.length > maxLengthValidation.length)
26
+ || (minLengthValidation && props.modelValue?.length
27
+ && props.modelValue?.length < minLengthValidation.length)
28
+ }">
29
+ {{
30
+ (minLengthValidation && props.modelValue?.length && props.modelValue?.length < minLengthValidation.length)
31
+ ? t( 'info.minLength', { minLength: minLengthValidation.length, length: props.modelValue?.length ?? 0 })
32
+ : t( 'info.maxLength', { maxLength: maxLengthValidation.length, length: props.modelValue?.length ?? 0 })
33
+ }}
25
34
  </small>
26
35
  </div>
27
36
  </div>
@@ -127,7 +136,8 @@
127
136
  if(validator.name === name) return validator
128
137
  }
129
138
 
130
- const maxLengthValidation = computed(() => findValidation('maxLength')?.params)
139
+ const maxLengthValidation = computed(() => findValidation('maxLength'))
140
+ const minLengthValidation = computed(() => findValidation('minLength'))
131
141
 
132
142
  const config = inject('auto-form', {
133
143
  inputs: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-auto-form",
3
- "version": "0.8.78",
3
+ "version": "0.8.79",
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.78",
26
- "@live-change/dao": "^0.8.78",
27
- "@live-change/dao-vue3": "^0.8.78",
28
- "@live-change/dao-websocket": "^0.8.78",
29
- "@live-change/framework": "^0.8.78",
30
- "@live-change/image-frontend": "^0.8.78",
31
- "@live-change/image-service": "^0.8.78",
32
- "@live-change/session-service": "^0.8.78",
33
- "@live-change/vue3-components": "^0.8.78",
34
- "@live-change/vue3-ssr": "^0.8.78",
25
+ "@live-change/cli": "^0.8.79",
26
+ "@live-change/dao": "^0.8.79",
27
+ "@live-change/dao-vue3": "^0.8.79",
28
+ "@live-change/dao-websocket": "^0.8.79",
29
+ "@live-change/framework": "^0.8.79",
30
+ "@live-change/image-frontend": "^0.8.79",
31
+ "@live-change/image-service": "^0.8.79",
32
+ "@live-change/session-service": "^0.8.79",
33
+ "@live-change/vue3-components": "^0.8.79",
34
+ "@live-change/vue3-ssr": "^0.8.79",
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.78",
55
+ "@live-change/codeceptjs-helper": "^0.8.79",
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": "097c9d0026935ae49076b35cffb990ca743d625a"
66
+ "gitHead": "35dc736fb78a7ce3c6bb380ee8a99ce07b79d4de"
67
67
  }