updated validator

This commit is contained in:
ArnabChatterjee20k
2026-04-09 11:14:28 +05:30
parent 71b28eae5a
commit 45dc259df3
3 changed files with 8 additions and 6 deletions
Generated
+4 -4
View File
@@ -3854,12 +3854,12 @@
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "ad89dab91d0e85f4496d366ad80b687cbdefd714"
"reference": "17615116013c18b8f4d00246d52268ffbc15b11c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/ad89dab91d0e85f4496d366ad80b687cbdefd714",
"reference": "ad89dab91d0e85f4496d366ad80b687cbdefd714",
"url": "https://api.github.com/repos/utopia-php/database/zipball/17615116013c18b8f4d00246d52268ffbc15b11c",
"reference": "17615116013c18b8f4d00246d52268ffbc15b11c",
"shasum": ""
},
"require": {
@@ -3905,7 +3905,7 @@
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/big-init"
},
"time": "2026-04-01T05:25:04+00:00"
"time": "2026-04-09T05:22:46+00:00"
},
{
"name": "utopia-php/detector",
@@ -8,6 +8,7 @@ use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
use Utopia\Database\Database;
use Utopia\Database\Validator\BigInt;
use Utopia\Database\Validator\Key;
use Utopia\Database\Validator\UID;
use Utopia\Http\Adapter\Swoole\Response as SwooleResponse;
@@ -58,7 +59,7 @@ class Create extends BigIntCreate
->param('required', null, new Boolean(), 'Is column required?')
->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true)
->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true)
->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when column is required.', true)
->param('default', null, new Nullable(new BigInt(false, true)), 'Default value. Cannot be set when column is required.', true)
->param('array', false, new Boolean(), 'Is column an array?', true)
->inject('response')
->inject('dbForProject')
@@ -9,6 +9,7 @@ use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response as UtopiaResponse;
use Utopia\Database\Database;
use Utopia\Database\Validator\BigInt;
use Utopia\Database\Validator\Key;
use Utopia\Database\Validator\UID;
use Utopia\Http\Adapter\Swoole\Response as SwooleResponse;
@@ -60,7 +61,7 @@ class Update extends BigIntUpdate
->param('required', null, new Boolean(), 'Is column required?')
->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true)
->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true)
->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when column is required.')
->param('default', null, new Nullable(new BigInt(false, true)), 'Default value. Cannot be set when column is required.')
->param('newKey', null, fn (Database $dbForProject) => new Nullable(new Key(false, $dbForProject->getAdapter()->getMaxUIDLength())), 'New Column Key.', true, ['dbForProject'])
->inject('response')
->inject('dbForProject')