mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
505 B
PHTML
24 lines
505 B
PHTML
1 year ago
|
<?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();
|
||
|
}
|
||
|
}
|