From 01ced8a84946945511d54f3f401e3f7a779c22bd Mon Sep 17 00:00:00 2001 From: Ahmad Asjad Date: Thu, 19 Sep 2024 10:23:55 +0530 Subject: [PATCH] Regex correction to allow dot(in postgreSql) -(in PostgreSQL/SQLite/SQL Server) with double qoute or with backticks in MySql --- src/Generator/ActiveRecord/Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator/ActiveRecord/Command.php b/src/Generator/ActiveRecord/Command.php index c71f2f48..a8d0d37d 100644 --- a/src/Generator/ActiveRecord/Command.php +++ b/src/Generator/ActiveRecord/Command.php @@ -24,7 +24,7 @@ public function __construct( private readonly string $namespace = 'App\\Model', #[Required] #[Regex( - pattern: '/^[a-z_][a-z0-9_]*$/i', + pattern: '/^[\w-]+(?:\.[\w-]+)?$/i', message: 'Invalid table name' )] #[TableExistsRule]