@thecb/components 10.5.3 → 10.5.4
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/dist/index.cjs.js +12 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/molecules/registration-form/RegistrationForm.js +6 -3
- package/src/components/molecules/registration-form/RegistrationForm.state.js +4 -3
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thecb/components",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.4",
|
|
4
4
|
"description": "Common lib for CityBase react components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -90,6 +90,6 @@
|
|
|
90
90
|
"ramda": "^0.27.0",
|
|
91
91
|
"react-aria-modal": "^4.0.0",
|
|
92
92
|
"react-pose": "^4.0.10",
|
|
93
|
-
"redux-freeform": "^5.
|
|
93
|
+
"redux-freeform": "^5.9.0"
|
|
94
94
|
}
|
|
95
95
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
hasLowercaseLetter,
|
|
8
8
|
hasUppercaseLetter,
|
|
9
9
|
hasSpecialCharacter,
|
|
10
|
-
isProbablyEmail
|
|
10
|
+
isProbablyEmail,
|
|
11
|
+
validName
|
|
11
12
|
} from "redux-freeform";
|
|
12
13
|
import PasswordRequirements from "../../atoms/password-requirements";
|
|
13
14
|
import { Box } from "../../atoms/layouts";
|
|
@@ -26,10 +27,12 @@ const RegistrationForm = ({
|
|
|
26
27
|
useEffect(() => () => actions.form.clear(), []);
|
|
27
28
|
}
|
|
28
29
|
const firstNameErrorMessages = {
|
|
29
|
-
[required.error]: "First name is required"
|
|
30
|
+
[required.error]: "First name is required",
|
|
31
|
+
[validName.error]: "First name contains invalid characters"
|
|
30
32
|
};
|
|
31
33
|
const lastNameErrorMessages = {
|
|
32
|
-
[required.error]: "Last name is required"
|
|
34
|
+
[required.error]: "Last name is required",
|
|
35
|
+
[validName.error]: "Last name contains invalid characters"
|
|
33
36
|
};
|
|
34
37
|
const emailErrorMessages = {
|
|
35
38
|
[required.error]: "Email is required",
|
|
@@ -7,15 +7,16 @@ import {
|
|
|
7
7
|
hasLowercaseLetter,
|
|
8
8
|
hasUppercaseLetter,
|
|
9
9
|
hasSpecialCharacter,
|
|
10
|
-
isProbablyEmail
|
|
10
|
+
isProbablyEmail,
|
|
11
|
+
validName
|
|
11
12
|
} from "redux-freeform";
|
|
12
13
|
|
|
13
14
|
const formConfig = {
|
|
14
15
|
firstName: {
|
|
15
|
-
validators: [required()]
|
|
16
|
+
validators: [required(), validName()]
|
|
16
17
|
},
|
|
17
18
|
lastName: {
|
|
18
|
-
validators: [required()]
|
|
19
|
+
validators: [required(), validName()]
|
|
19
20
|
},
|
|
20
21
|
email: {
|
|
21
22
|
validators: [required(), isProbablyEmail()]
|
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/components/.DS_Store
DELETED
|
Binary file
|