@azteam/express 1.2.264 → 1.2.266

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/validate.js +15 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.264",
3
+ "version": "1.2.266",
4
4
  "main": "src/index.js",
5
5
  "engines": {
6
6
  "node": ">= 12.0.0",
package/src/validate.js CHANGED
@@ -93,6 +93,16 @@ export const schemaSlug = (optional = false) => ({
93
93
  max: 300,
94
94
  optional,
95
95
  });
96
+
97
+ export const schemaKey = (optional = false) => ({
98
+ type: 'string',
99
+ convert: true,
100
+ pattern: /[A-Za-z0-9_-]+/,
101
+ uppercase: true,
102
+ max: 300,
103
+ optional,
104
+ });
105
+
96
106
  export const schemaVersion = (optional = false) => ({
97
107
  type: 'string',
98
108
  pattern: /^(\d+)\.(\d+)\.(\d+)$/,
@@ -136,6 +146,11 @@ export const rulesId = {
136
146
  export const rulesSlug = {
137
147
  slug: schemaSlug(),
138
148
  };
149
+
150
+ export const rulesKey = {
151
+ slug: schemaKey(),
152
+ };
153
+
139
154
  export const rulesPlatformType = {
140
155
  type: schemaEnum(['web', 'app']),
141
156
  };