@rimori/client 2.3.0-next.5 → 2.3.0-next.6
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.
|
@@ -18,8 +18,8 @@ export class AccomplishmentController {
|
|
|
18
18
|
throw new Error(`Invalid skill category: ${payload.skillCategory}`);
|
|
19
19
|
}
|
|
20
20
|
//regex validate accomplishmentKeyword
|
|
21
|
-
if (!/^[
|
|
22
|
-
throw new Error(`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses and
|
|
21
|
+
if (!/^[0-9a-z_.-]+$/.test(payload.accomplishmentKeyword)) {
|
|
22
|
+
throw new Error(`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses, underscores and periods are allowed`);
|
|
23
23
|
}
|
|
24
24
|
//description is required
|
|
25
25
|
if (payload.description.length < 10) {
|
package/package.json
CHANGED
|
@@ -66,9 +66,9 @@ export class AccomplishmentController {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
//regex validate accomplishmentKeyword
|
|
69
|
-
if (!/^[
|
|
69
|
+
if (!/^[0-9a-z_.-]+$/.test(payload.accomplishmentKeyword)) {
|
|
70
70
|
throw new Error(
|
|
71
|
-
`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses and
|
|
71
|
+
`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses, underscores and periods are allowed`,
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
|