mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-17 20:11:27 +00:00
23 lines
505 B
PHP
23 lines
505 B
PHP
<?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();
|
|
}
|
|
}
|