@thecb/components 10.3.2-beta.1 → 10.3.2-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "10.3.2-beta.1",
3
+ "version": "10.3.2-beta.2",
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.8.0"
93
+ "redux-freeform": "^5.9.0-beta.0"
94
94
  }
95
95
  }
@@ -8,7 +8,7 @@ import {
8
8
  hasUppercaseLetter,
9
9
  hasSpecialCharacter,
10
10
  isProbablyEmail,
11
- matchesRegex
11
+ validName
12
12
  } from "redux-freeform";
13
13
  import PasswordRequirements from "../../atoms/password-requirements";
14
14
  import { Box } from "../../atoms/layouts";
@@ -28,11 +28,11 @@ const RegistrationForm = ({
28
28
  }
29
29
  const firstNameErrorMessages = {
30
30
  [required.error]: "First name is required",
31
- [matchesRegex.error]: "First name contains invalid characters"
31
+ [validName.error]: "First name contains invalid characters"
32
32
  };
33
33
  const lastNameErrorMessages = {
34
34
  [required.error]: "Last name is required",
35
- [matchesRegex.error]: "Last name contains invalid characters"
35
+ [validName.error]: "Last name contains invalid characters"
36
36
  };
37
37
  const emailErrorMessages = {
38
38
  [required.error]: "Email is required",
@@ -8,15 +8,15 @@ import {
8
8
  hasUppercaseLetter,
9
9
  hasSpecialCharacter,
10
10
  isProbablyEmail,
11
- matchesRegex
11
+ validName
12
12
  } from "redux-freeform";
13
13
 
14
14
  const formConfig = {
15
15
  firstName: {
16
- validators: [required(), matchesRegex(/[A-Za-z]+(\s?[A-Za-z\-,'])*/i)]
16
+ validators: [required(), validName()]
17
17
  },
18
18
  lastName: {
19
- validators: [required(), matchesRegex(/[A-Za-z]+(\s?[A-Za-z\-,'])*/i)]
19
+ validators: [required(), validName()]
20
20
  },
21
21
  email: {
22
22
  validators: [required(), isProbablyEmail()]