2020-03-23 01:15:38 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Client\Account;
|
|
|
|
|
|
|
|
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
|
|
|
|
|
|
|
class StoreApiKeyRequest extends ClientApiRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'description' => 'required|string|min:4',
|
|
|
|
'allowed_ips' => 'array',
|
|
|
|
'allowed_ips.*' => 'ip',
|
|
|
|
];
|
|
|
|
}
|
2020-08-18 02:48:51 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array|string[]
|
|
|
|
*/
|
|
|
|
public function messages()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'allowed_ips.*' => 'All of the IP addresses entered must be valid IPv4 addresses.',
|
|
|
|
];
|
|
|
|
}
|
2020-03-23 01:15:38 +00:00
|
|
|
}
|