@open-tender/utils 0.1.29 → 0.1.31
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.
|
@@ -38,8 +38,14 @@ const useProfileForm = (profile, loading, error, update
|
|
|
38
38
|
const errs = (0, utils_1.makeFormErrors)(error);
|
|
39
39
|
if (errs)
|
|
40
40
|
errs.form = 'There are one or more errors below.';
|
|
41
|
+
if (errs.birth_date) {
|
|
42
|
+
errs.birth_date = 'Invalid date. Please enter in mm/dd/yyyy format.';
|
|
43
|
+
}
|
|
41
44
|
setErrors(errs);
|
|
42
45
|
}
|
|
46
|
+
else {
|
|
47
|
+
setErrors({});
|
|
48
|
+
}
|
|
43
49
|
}
|
|
44
50
|
}, [loading, error]);
|
|
45
51
|
(0, react_1.useEffect)(() => {
|
|
@@ -35,8 +35,14 @@ export const useProfileForm = (profile, loading, error, update
|
|
|
35
35
|
const errs = makeFormErrors(error);
|
|
36
36
|
if (errs)
|
|
37
37
|
errs.form = 'There are one or more errors below.';
|
|
38
|
+
if (errs.birth_date) {
|
|
39
|
+
errs.birth_date = 'Invalid date. Please enter in mm/dd/yyyy format.';
|
|
40
|
+
}
|
|
38
41
|
setErrors(errs);
|
|
39
42
|
}
|
|
43
|
+
else {
|
|
44
|
+
setErrors({});
|
|
45
|
+
}
|
|
40
46
|
}
|
|
41
47
|
}, [loading, error]);
|
|
42
48
|
useEffect(() => {
|
package/package.json
CHANGED