@todesktop/shared 7.184.5 → 7.184.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.
- package/lib/validations.js +1 -0
- package/package.json +1 -1
- package/src/validations.ts +5 -0
package/lib/validations.js
CHANGED
|
@@ -83,6 +83,7 @@ exports.appProtocolValidation = yup
|
|
|
83
83
|
.required()
|
|
84
84
|
.label("App Protocol")
|
|
85
85
|
.test("ends-with-protocol", "Protocols must end with `://`", (value) => value.endsWith("://"))
|
|
86
|
+
.test("is-lowercase", "Protocols must be lowercase", (value) => value === value.toLowerCase())
|
|
86
87
|
.matches(/^[a-zA-Z\-]+\:\/\/$/, "Protocols contain letters and dashes (-) only")
|
|
87
88
|
.min(5);
|
|
88
89
|
exports.appConfigValidation = yup.object({
|
package/package.json
CHANGED
package/src/validations.ts
CHANGED
|
@@ -117,6 +117,11 @@ export const appProtocolValidation = yup
|
|
|
117
117
|
"Protocols must end with `://`",
|
|
118
118
|
(value: string) => value.endsWith("://")
|
|
119
119
|
)
|
|
120
|
+
.test(
|
|
121
|
+
"is-lowercase",
|
|
122
|
+
"Protocols must be lowercase",
|
|
123
|
+
(value) => value === value.toLowerCase()
|
|
124
|
+
)
|
|
120
125
|
.matches(
|
|
121
126
|
/^[a-zA-Z\-]+\:\/\/$/,
|
|
122
127
|
"Protocols contain letters and dashes (-) only"
|