appwrite/src/Appwrite/Database/Validator/UID.php

39 lines
594 B
PHP
Raw Normal View History

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