@conform-to/dom 0.8.0-pre.1 → 0.8.0
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/formdata.js +5 -2
- package/formdata.mjs +5 -2
- package/package.json +1 -1
package/formdata.js
CHANGED
|
@@ -119,8 +119,11 @@ function getValidationMessage(errors) {
|
|
|
119
119
|
* Retrieve the error messages from the validation message
|
|
120
120
|
*/
|
|
121
121
|
function getErrors(validationMessage) {
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
// Empty string should be considered no error as well
|
|
123
|
+
if (!validationMessage) {
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
return validationMessage.split(String.fromCharCode(31));
|
|
124
127
|
}
|
|
125
128
|
|
|
126
129
|
exports.formatPaths = formatPaths;
|
package/formdata.mjs
CHANGED
|
@@ -115,8 +115,11 @@ function getValidationMessage(errors) {
|
|
|
115
115
|
* Retrieve the error messages from the validation message
|
|
116
116
|
*/
|
|
117
117
|
function getErrors(validationMessage) {
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
// Empty string should be considered no error as well
|
|
119
|
+
if (!validationMessage) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
return validationMessage.split(String.fromCharCode(31));
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
export { formatPaths, getErrors, getFormData, getPaths, getValidationMessage, resolve, setValue };
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A set of opinionated helpers built on top of the Constraint Validation API",
|
|
4
4
|
"homepage": "https://conform.guide",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.8.0
|
|
6
|
+
"version": "0.8.0",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.mjs",
|
|
9
9
|
"types": "index.d.ts",
|