mirror of
https://github.com/appwrite/appwrite
synced 2026-05-18 22:48:31 +00:00
23 lines
381 B
PHP
23 lines
381 B
PHP
<?php
|
|
|
|
namespace Appwrite\Utopia\Database\Validator;
|
|
|
|
use Utopia\Database\Validator\Key;
|
|
|
|
class CustomId extends Key
|
|
{
|
|
/**
|
|
* Is valid.
|
|
*
|
|
* Returns true if valid or false if not.
|
|
*
|
|
* @param $value
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function isValid($value): bool
|
|
{
|
|
|
|
return $value == 'unique()' || parent::isValid($value);
|
|
}
|
|
}
|