mirror of
https://github.com/appwrite/appwrite
synced 2026-05-15 13:08:31 +00:00
24 lines
450 B
PHP
24 lines
450 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Appwrite\Event\Validator;
|
||
|
|
|
||
|
|
class FunctionEvent extends Event
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Is valid.
|
||
|
|
*
|
||
|
|
* @param mixed $value
|
||
|
|
*
|
||
|
|
* @return bool
|
||
|
|
*/
|
||
|
|
public function isValid($value): bool
|
||
|
|
{
|
||
|
|
if (str_starts_with($value, 'functions.')) {
|
||
|
|
$this->message = 'Triggering a function on a function event is not allowed.';
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
return parent::isValid($value);
|
||
|
|
}
|
||
|
|
}
|