@cofondateurauchomage/libs 1.1.164 → 1.1.165

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/build/regex.d.ts CHANGED
@@ -10,22 +10,18 @@ export declare const RGX: {
10
10
  };
11
11
  Email: {
12
12
  regex: RegExp;
13
- pattern: string;
14
13
  message: string;
15
14
  };
16
15
  Linkedin: {
17
16
  regex: RegExp;
18
- pattern: string;
19
17
  message: string;
20
18
  };
21
19
  Name: {
22
20
  regex: RegExp;
23
- pattern: string;
24
21
  message: string;
25
22
  };
26
23
  Tel: {
27
24
  regex: RegExp;
28
- pattern: string;
29
25
  message: string;
30
26
  };
31
27
  };
package/build/regex.js CHANGED
@@ -6,11 +6,10 @@ const regex = {
6
6
  date: /^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$/,
7
7
  email: /^[\w.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,
8
8
  /** Saisie tolérante (schéma / attribut HTML). La valeur canonique est produite par `normalizeLinkedInUrl`. */
9
- linkedin: /^(https?:\/\/)?(www\.)?([\w-]+\.)?linkedin\.com\/(pub|in|profile|company)\/.+$/i,
9
+ linkedin: /^(https?:\/\/)?(www\.)?([\w\-]+\.)?linkedin\.com\/(pub|in|profile|company)\/.+$/i,
10
10
  name: /^(?=.*[A-Za-zÜ-ü])[A-Za-zÜ-ü\s\-]{1,50}$/,
11
11
  tel: /^([+][1-9]{2,3}[ .\-]?)?[0-9]{1,3}([ .\-]?[0-9]{2,3}){3,6}$/,
12
12
  };
13
- const pattern = (regex) => String(regex).replace("/^", "").replace("$/", "");
14
13
  /**
15
14
  * Accepte plusieurs formes d’URL profil LinkedIn et renvoie toujours
16
15
  * `https://www.linkedin.com/.../` (slash final, sans query/hash).
@@ -51,22 +50,18 @@ exports.RGX = {
51
50
  },
52
51
  Email: {
53
52
  regex: regex.email,
54
- pattern: pattern(regex.email),
55
53
  message: `Veuillez entrer une adresse email valide.`,
56
54
  },
57
55
  Linkedin: {
58
56
  regex: regex.linkedin,
59
- pattern: pattern(regex.linkedin),
60
57
  message: `Le lien doit être un URL LinkedIn valide. (ex: https://www.linkedin.com/in/valentin-lemaire/)`,
61
58
  },
62
59
  Name: {
63
60
  regex: regex.name,
64
- pattern: pattern(regex.name),
65
61
  message: `Accepte les noms composés (espace ou -) et les accents jusqu'à 50 caractères. Les caractères spéciaux et les chiffres ne sont pas autorisés.`,
66
62
  },
67
63
  Tel: {
68
64
  regex: regex.tel,
69
- pattern: pattern(regex.tel),
70
65
  message: `Veuillez entrer un numéro de téléphone valide.`,
71
66
  },
72
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.164",
3
+ "version": "1.1.165",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {