@cocreate/validation 1.15.4 → 1.15.6
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/CHANGELOG.md +15 -0
- package/docs/index.html +9 -23
- package/package.json +3 -3
- package/src/validations/required.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.15.6](https://github.com/CoCreate-app/CoCreate-validation/compare/v1.15.5...v1.15.6) (2024-06-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump cocreate dependencies ([e07e357](https://github.com/CoCreate-app/CoCreate-validation/commit/e07e357a44accc1cd17343232f03b6fa8ae253dc))
|
|
7
|
+
* svg icon class ([c2ecdb1](https://github.com/CoCreate-app/CoCreate-validation/commit/c2ecdb1debbd3c29504a326af55374b3e6521a05))
|
|
8
|
+
|
|
9
|
+
## [1.15.5](https://github.com/CoCreate-app/CoCreate-validation/compare/v1.15.4...v1.15.5) (2024-05-19)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* handling required validation of checkbox ([1a1b741](https://github.com/CoCreate-app/CoCreate-validation/commit/1a1b741645b7ec72371aef0d18e150e818dddb55))
|
|
15
|
+
|
|
1
16
|
## [1.15.4](https://github.com/CoCreate-app/CoCreate-validation/compare/v1.15.3...v1.15.4) (2024-04-29)
|
|
2
17
|
|
|
3
18
|
|
package/docs/index.html
CHANGED
|
@@ -71,41 +71,31 @@
|
|
|
71
71
|
href="https://github.com/CoCreate-app/CoCreate-validation"
|
|
72
72
|
target="_blank"
|
|
73
73
|
class="margin-right:15px"
|
|
74
|
-
><i
|
|
75
|
-
class="height:20px fill:#505050"
|
|
76
|
-
src="/assets/svg/github.svg"></i
|
|
74
|
+
><i src="/assets/svg/github.svg"></i
|
|
77
75
|
></a>
|
|
78
76
|
<a
|
|
79
77
|
class="margin-right:15px share"
|
|
80
78
|
share-network="twitter"
|
|
81
79
|
title="Share on twitter"
|
|
82
|
-
><i
|
|
83
|
-
class="height:20px fill:#505050"
|
|
84
|
-
src="/assets/svg/twitter.svg"></i
|
|
80
|
+
><i src="/assets/svg/twitter.svg"></i
|
|
85
81
|
></a>
|
|
86
82
|
<a
|
|
87
83
|
class="margin-right:15px share"
|
|
88
84
|
share-network="facebook"
|
|
89
85
|
title="Share on Facebook"
|
|
90
|
-
><i
|
|
91
|
-
class="height:20px fill:#505050"
|
|
92
|
-
src="/assets/svg/facebook.svg"></i
|
|
86
|
+
><i src="/assets/svg/facebook.svg"></i
|
|
93
87
|
></a>
|
|
94
88
|
<a
|
|
95
89
|
class="margin-right:15px share"
|
|
96
90
|
share-network="instagram"
|
|
97
91
|
title="Share on instagram"
|
|
98
|
-
><i
|
|
99
|
-
class="height:20px fill:#505050"
|
|
100
|
-
src="/assets/svg/instagram.svg"></i
|
|
92
|
+
><i src="/assets/svg/instagram.svg"></i
|
|
101
93
|
></a>
|
|
102
94
|
<a
|
|
103
95
|
class="margin-right:15px share"
|
|
104
96
|
share-network="share"
|
|
105
97
|
title="Share on share"
|
|
106
|
-
><i
|
|
107
|
-
class="height:20px fill:#505050"
|
|
108
|
-
src="/assets/svg/share-alt.svg"></i
|
|
98
|
+
><i src="/assets/svg/share-alt.svg"></i
|
|
109
99
|
></a>
|
|
110
100
|
</div>
|
|
111
101
|
</div>
|
|
@@ -227,7 +217,7 @@
|
|
|
227
217
|
toggle="code-height"
|
|
228
218
|
toggle-selector="#demo-code"
|
|
229
219
|
><i
|
|
230
|
-
class="height:18px
|
|
220
|
+
class="height:18px"
|
|
231
221
|
src="/assets/svg/eye.svg"></i
|
|
232
222
|
></a>
|
|
233
223
|
<a
|
|
@@ -238,18 +228,14 @@
|
|
|
238
228
|
hide="#eye-slash"
|
|
239
229
|
toggle="code-height"
|
|
240
230
|
toggle-selector="#demo-code"
|
|
241
|
-
><i
|
|
242
|
-
class="height:20px fill:#505050"
|
|
243
|
-
src="/assets/svg/eye-slash.svg"></i
|
|
231
|
+
><i src="/assets/svg/eye-slash.svg"></i
|
|
244
232
|
></a>
|
|
245
233
|
<a
|
|
246
234
|
class="margin-right:10px"
|
|
247
235
|
id="code"
|
|
248
236
|
show="#code-slash"
|
|
249
237
|
hide="#code, #demo-code"
|
|
250
|
-
><i
|
|
251
|
-
class="height:20px fill:#505050"
|
|
252
|
-
src="/assets/svg/code.svg"></i
|
|
238
|
+
><i src="/assets/svg/code.svg"></i
|
|
253
239
|
></a>
|
|
254
240
|
<a
|
|
255
241
|
class="margin-right:10px"
|
|
@@ -258,7 +244,7 @@
|
|
|
258
244
|
show="#code, #demo-code"
|
|
259
245
|
hide="#code-slash"
|
|
260
246
|
><i
|
|
261
|
-
class="
|
|
247
|
+
class="height:18px"
|
|
262
248
|
src="/assets/svg/code.svg"></i
|
|
263
249
|
></a>
|
|
264
250
|
<a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/validation",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.6",
|
|
4
4
|
"description": "A simple validation component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"validation",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"webpack-log": "^3.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@cocreate/actions": "^1.18.
|
|
62
|
-
"@cocreate/render": "^1.
|
|
61
|
+
"@cocreate/actions": "^1.18.2",
|
|
62
|
+
"@cocreate/render": "^1.41.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -6,7 +6,7 @@ export var required = async (elements) => {
|
|
|
6
6
|
let failedElements = [];
|
|
7
7
|
for (let element of elements) {
|
|
8
8
|
let value = await element.getValue();
|
|
9
|
-
if (value || value === 0 || value === false) {
|
|
9
|
+
if (value || value === 0 || (value === false && element.type !== 'checkbox')) {
|
|
10
10
|
element.setAttribute('validation', 'true');
|
|
11
11
|
} else {
|
|
12
12
|
element.setAttribute('validation', 'false');
|