Add validation to prevent invalid ports, closes #1034

This commit is contained in:
Dane Everitt 2018-03-10 13:10:40 -06:00
parent bc3cb7bfd5
commit 40c74ae1e7
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 205 additions and 152 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace Pterodactyl\Exceptions\Service\Allocation;
use Pterodactyl\Exceptions\DisplayException;
class InvalidPortMappingException extends DisplayException
{
/**
* InvalidPortMappingException constructor.
*
* @param mixed $port
*/
public function __construct($port)
{
parent::__construct(trans('exceptions.allocations.invalid_mapping', ['port' => $port]));
}
}