web-dc-api 0.0.13 → 0.0.14
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.
|
@@ -305,9 +305,8 @@ export class DB implements App, IDB {
|
|
|
305
305
|
|
|
306
306
|
async saveName(prevName: string): Promise<void> {
|
|
307
307
|
if (this.name === prevName) return;
|
|
308
|
-
if (!this.name.match(/^[a-zA-Z0-
|
|
308
|
+
if (!this.name.match(/^[a-zA-Z0-9_-]+$/)) {
|
|
309
309
|
// 根据需求定义规则
|
|
310
|
-
|
|
311
310
|
throw new Error("Invalid name");
|
|
312
311
|
}
|
|
313
312
|
await this.datastore.put(
|