Skip to content

Commit 0360992

Browse files
chore: update project name validation to allow only letters, underscores, and hyphens and bump version to 1.0.4
1 parent 2a1baeb commit 0360992

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-lab",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"type": "module",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",

src/prompts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ export default async function prompts() {
6767
message: "What is the name of your React Native project?",
6868
default: "MyReactNativeApp",
6969
validate: (input: string) => {
70-
const isValid = /^[a-zA-Z0-9_-]+$/.test(input);
70+
const isValid = /^[a-zA-Z_-]+$/.test(input);
7171
return isValid
7272
? true
73-
: "Project name can only contain letters, numbers, underscores, and hyphens.";
73+
: "Project name can only contain letters, underscores, and hyphens.";
7474
},
7575
});
7676

0 commit comments

Comments
 (0)