pixelfed/app/Util/ActivityPub/Validator/MoveValidator.php

24 lines
505 B
PHP
Raw Permalink Normal View History

2024-09-07 08:46:11 +00:00
<?php
namespace App\Util\ActivityPub\Validator;
use Illuminate\Validation\Rule;
use Validator;
class MoveValidator
{
public static function validate($payload)
{
return Validator::make($payload, [
'@context' => 'required',
'type' => [
'required',
Rule::in(['Move']),
],
'actor' => 'required|url',
'object' => 'required|url',
'target' => 'required|url',
])->passes();
}
}