mirror of
https://github.com/appwrite/appwrite
synced 2026-05-15 04:59:01 +00:00
23 lines
459 B
PHP
23 lines
459 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 ?? false, 'functions.')) {
|
|
$this->message = 'Triggering a function on a function event is not allowed.';
|
|
return false;
|
|
}
|
|
|
|
return parent::isValid($value);
|
|
}
|
|
}
|