Files
appwrite/src/Database/Validator/UID.php
T
eldadfux 35680bbae9 Run PHP-CS-FIXER to make sure
code is consisted with PSR-1 + PSR-2
2019-09-06 20:04:26 +03:00

39 lines
585 B
PHP

<?php
namespace Database\Validator;
use Utopia\Validator;
class UID extends Validator
{
/**
* Get Description.
*
* Returns validator description
*
* @return string
*/
public function getDescription()
{
return 'Validate UUID format';
}
/**
* Is valid.
*
* Returns true if valid or false if not.
*
* @param string $value
*
* @return bool
*/
public function isValid($value)
{
if (is_numeric($value)) {
//return false;
}
return true;
}
}