From 1c465a8cdac8f0f3c08761070801204c088fb4e1 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sun, 19 Oct 2025 22:16:03 +0100 Subject: [PATCH] refactor: standardize email validation across API controllers - Reintroduced the Utopia Emails validator in multiple API controllers to ensure consistent email validation practices. - Removed deprecated email validation references, streamlining the codebase and aligning with recent updates to the Utopia Emails library. --- app/controllers/api/account.php | 4 ++-- app/controllers/api/messaging.php | 2 +- app/controllers/api/projects.php | 2 +- app/controllers/api/teams.php | 2 +- app/controllers/api/users.php | 2 +- app/init/database/formats.php | 2 +- .../Http/Databases/Collections/Attributes/Email/Create.php | 2 +- .../Http/Databases/Collections/Attributes/Email/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Email/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Email/Update.php | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 63252e364e..ca3c2b9f3b 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -20,8 +20,6 @@ use Appwrite\Event\Messaging; use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; use Appwrite\Hooks\Hooks; -use Utopia\Emails\Validator\Email; -use Utopia\Emails\Validator\EmailNotDisposable; use Appwrite\Network\Validator\Redirect; use Appwrite\OpenSSL\OpenSSL; use Appwrite\SDK\AuthType; @@ -58,6 +56,8 @@ use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; +use Utopia\Emails\Validator\Email; +use Utopia\Emails\Validator\EmailNotDisposable; use Utopia\Locale\Locale; use Utopia\Storage\Validator\FileName; use Utopia\System\System; diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index e671366769..1f4e1300c6 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -8,7 +8,6 @@ use Appwrite\Event\Event; use Appwrite\Event\Messaging; use Appwrite\Extend\Exception; use Appwrite\Messaging\Status as MessageStatus; -use Utopia\Emails\Validator\Email; use Appwrite\Permission; use Appwrite\Role; use Appwrite\SDK\AuthType; @@ -43,6 +42,7 @@ use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\Roles; use Utopia\Database\Validator\UID; +use Utopia\Emails\Validator\Email; use Utopia\Locale\Locale; use Utopia\System\System; use Utopia\Validator\ArrayList; diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 8bf05fec45..dd0faab3cc 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -9,7 +9,6 @@ use Appwrite\Event\Validator\Event; use Appwrite\Extend\Exception; use Appwrite\Hooks\Hooks; use Appwrite\Network\Platform; -use Utopia\Emails\Validator\Email; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Deprecated; @@ -38,6 +37,7 @@ use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\UID; use Utopia\Domains\Validator\PublicDomain; use Utopia\DSN\DSN; +use Utopia\Emails\Validator\Email; use Utopia\Locale\Locale; use Utopia\Pools\Group; use Utopia\System\System; diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index bed60a099d..25279c1ae1 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -10,7 +10,6 @@ use Appwrite\Event\Mail; use Appwrite\Event\Messaging; use Appwrite\Event\StatsUsage; use Appwrite\Extend\Exception; -use Utopia\Emails\Validator\Email; use Appwrite\Network\Validator\Redirect; use Appwrite\Platform\Workers\Deletes; use Appwrite\SDK\AuthType; @@ -48,6 +47,7 @@ use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; +use Utopia\Emails\Validator\Email; use Utopia\Locale\Locale; use Utopia\System\System; use Utopia\Validator\ArrayList; diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 4be322596a..bf135646a8 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -16,7 +16,6 @@ use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Extend\Exception; use Appwrite\Hooks\Hooks; -use Utopia\Emails\Validator\Email; use Appwrite\SDK\AuthType; use Appwrite\SDK\ContentType; use Appwrite\SDK\Deprecated; @@ -49,6 +48,7 @@ use Utopia\Database\Validator\Query\Cursor; use Utopia\Database\Validator\Query\Limit; use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\UID; +use Utopia\Emails\Validator\Email; use Utopia\Locale\Locale; use Utopia\System\System; use Utopia\Validator\ArrayList; diff --git a/app/init/database/formats.php b/app/init/database/formats.php index 6b38d171a0..29a4f0c7d4 100644 --- a/app/init/database/formats.php +++ b/app/init/database/formats.php @@ -1,9 +1,9 @@