1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00
appwrite/src/Appwrite/Database/Validator/CustomId.php
2021-12-13 16:42:40 +01:00

21 lines
372 B
PHP

<?php
namespace Appwrite\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);
}
}