@digigov/form 2.3.0 → 2.4.1-govgr-4546.09-06-26-10-15

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 CHANGED
@@ -1,9 +1,17 @@
1
1
  # Change Log - @digigov/form
2
2
 
3
- <!-- This log was last generated on Mon, 04 May 2026 10:21:16 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Tue, 09 Jun 2026 10:15:40 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.4.1-govgr-4546.09-06-26-10-15
8
+
9
+ Tue, 09 Jun 2026 10:15:40 GMT
10
+
11
+ ### Patches
12
+
13
+ - Fix an issue where not required fields don't allow null value (sangelopoulos@admin.grnet.gr)
14
+
7
15
  ## 2.1.1
8
16
 
9
17
  Mon, 04 May 2026 10:21:16 GMT
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v2.3.0
1
+ /** @license Digigov v2.4.1-govgr-4546.09-06-26-10-15
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/form",
3
- "version": "2.3.0",
3
+ "version": "2.4.1-govgr-4546.09-06-26-10-15",
4
4
  "description": "@digigov form builder",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
@@ -15,14 +15,14 @@
15
15
  "yup": "0.32.11",
16
16
  "dayjs": "1.10.4",
17
17
  "@hookform/resolvers": "5.0.1",
18
- "@digigov/react-icons": "2.3.0"
18
+ "@digigov/react-icons": "2.4.1-govgr-4546.09-06-26-10-15"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "clsx": "2.1.1",
22
22
  "react": "^18.3.0 || ^19.1.0",
23
23
  "react-dom": "^18.3.0 || ^19.1.0",
24
- "@digigov/ui": "2.3.0",
25
- "@digigov/react-core": "2.3.0"
24
+ "@digigov/ui": "2.4.1-govgr-4546.09-06-26-10-15",
25
+ "@digigov/react-core": "2.4.1-govgr-4546.09-06-26-10-15"
26
26
  },
27
27
  "gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871",
28
28
  "private": false,
@@ -64,7 +64,10 @@ export function computeShape(
64
64
  }
65
65
  } else if (field.required) {
66
66
  yupField = yupField.nullable().required('form.error.required');
67
+ } else if (!field.required) {
68
+ yupField = yupField.nullable();
67
69
  }
70
+
68
71
  if (validatorRegistry && field.type && validatorRegistry[field.type]) {
69
72
  if (Array.isArray(validatorRegistry[field.type])) {
70
73
  validatorRegistry[field.type].forEach((validator: any) => {
@@ -42,6 +42,7 @@ function computeShape(fields, yupTypeMap, validatorRegistry) {
42
42
  });
43
43
  }
44
44
  else if (field.required) yupField = yupField.nullable().required('form.error.required');
45
+ else if (!field.required) yupField = yupField.nullable();
45
46
  if (validatorRegistry && field.type && validatorRegistry[field.type]) if (Array.isArray(validatorRegistry[field.type])) validatorRegistry[field.type].forEach((validator)=>{
46
47
  yupField = yupField.test(validator);
47
48
  });