@dhis2/ui-forms 8.4.1 → 8.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,12 +19,12 @@
19
19
  "Password should contain at least one UPPERCASE letter": "Password should contain at least one UPPERCASE letter",
20
20
  "Password should contain at least one number": "Password should contain at least one number",
21
21
  "Password should have at least one special character": "Password should have at least one special character",
22
- "Please provide a username between 4 and 255 characters": "Please provide a username between 4 and 255 characters",
23
22
  "Please provide a valid email address": "Please provide a valid email address",
24
23
  "Please provide a value": "Please provide a value",
25
24
  "Please provide a round number without decimals": "Please provide a round number without decimals",
26
25
  "Please provide a valid international phone number.": "Please provide a valid international phone number.",
27
26
  "Please provide a number": "Please provide a number",
28
27
  "Please provide a string": "Please provide a string",
29
- "Please provide a valid url": "Please provide a valid url"
28
+ "Please provide a valid url": "Please provide a valid url",
29
+ "Please provide a lowercase username between 4 and 255 characters long and possibly separated by . _ @ or #": "Please provide a lowercase username between 4 and 255 characters long and possibly separated by . _ @ or #"
30
30
  }
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
 
14
14
  const USERNAME_PATTERN = /^(?=.{4,255}$)(?![_.@])(?!.*[_.@]{2})[a-z0-9._@]+(?<![_.@])$/;
15
15
 
16
- const invalidUsernameMessage = _index.default.t('Please provide a username between 4 and 255 characters');
16
+ const invalidUsernameMessage = _index.default.t('Please provide a lowercase username between 4 and 255 characters long and possibly separated by . _ @ or #');
17
17
 
18
18
  exports.invalidUsernameMessage = invalidUsernameMessage;
19
19
 
@@ -19,12 +19,12 @@
19
19
  "Password should contain at least one UPPERCASE letter": "Password should contain at least one UPPERCASE letter",
20
20
  "Password should contain at least one number": "Password should contain at least one number",
21
21
  "Password should have at least one special character": "Password should have at least one special character",
22
- "Please provide a username between 4 and 255 characters": "Please provide a username between 4 and 255 characters",
23
22
  "Please provide a valid email address": "Please provide a valid email address",
24
23
  "Please provide a value": "Please provide a value",
25
24
  "Please provide a round number without decimals": "Please provide a round number without decimals",
26
25
  "Please provide a valid international phone number.": "Please provide a valid international phone number.",
27
26
  "Please provide a number": "Please provide a number",
28
27
  "Please provide a string": "Please provide a string",
29
- "Please provide a valid url": "Please provide a valid url"
28
+ "Please provide a valid url": "Please provide a valid url",
29
+ "Please provide a lowercase username between 4 and 255 characters long and possibly separated by . _ @ or #": "Please provide a lowercase username between 4 and 255 characters long and possibly separated by . _ @ or #"
30
30
  }
@@ -1,7 +1,7 @@
1
1
  import i18n from '../locales/index.js';
2
2
  import { isEmpty, isString } from './helpers/index.js';
3
3
  const USERNAME_PATTERN = /^(?=.{4,255}$)(?![_.@])(?!.*[_.@]{2})[a-z0-9._@]+(?<![_.@])$/;
4
- const invalidUsernameMessage = i18n.t('Please provide a username between 4 and 255 characters');
4
+ const invalidUsernameMessage = i18n.t('Please provide a lowercase username between 4 and 255 characters long and possibly separated by . _ @ or #');
5
5
 
6
6
  const dhis2Username = value => isEmpty(value) || isString(value) && USERNAME_PATTERN.test(value) ? undefined : invalidUsernameMessage;
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/ui-forms",
3
- "version": "8.4.1",
3
+ "version": "8.4.2",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "sideEffects": [
@@ -34,15 +34,15 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@dhis2/prop-types": "^3.1.2",
37
- "@dhis2-ui/button": "8.4.1",
38
- "@dhis2-ui/checkbox": "8.4.1",
39
- "@dhis2-ui/field": "8.4.1",
40
- "@dhis2-ui/file-input": "8.4.1",
41
- "@dhis2-ui/input": "8.4.1",
42
- "@dhis2-ui/radio": "8.4.1",
43
- "@dhis2-ui/select": "8.4.1",
44
- "@dhis2-ui/switch": "8.4.1",
45
- "@dhis2-ui/text-area": "8.4.1",
37
+ "@dhis2-ui/button": "8.4.2",
38
+ "@dhis2-ui/checkbox": "8.4.2",
39
+ "@dhis2-ui/field": "8.4.2",
40
+ "@dhis2-ui/file-input": "8.4.2",
41
+ "@dhis2-ui/input": "8.4.2",
42
+ "@dhis2-ui/radio": "8.4.2",
43
+ "@dhis2-ui/select": "8.4.2",
44
+ "@dhis2-ui/switch": "8.4.2",
45
+ "@dhis2-ui/text-area": "8.4.2",
46
46
  "classnames": "^2.3.1",
47
47
  "final-form": "^4.20.2",
48
48
  "prop-types": "^15.7.2",