Move Domain_Controller::NUMBER_MAX to Address::ADDRESS_FIELD_MAX
This commit is contained in:
@@ -10,9 +10,6 @@ use App\Models\{Address,Domain,Zone};
|
||||
|
||||
class DomainController extends Controller
|
||||
{
|
||||
// http://ftsc.org/docs/frl-1002.001
|
||||
public const NUMBER_MAX = 0x7fff;
|
||||
|
||||
/**
|
||||
* Add or edit a domain
|
||||
*/
|
||||
|
@@ -242,8 +242,8 @@ class SystemController extends Controller
|
||||
'point_id' => [
|
||||
'required',
|
||||
function($attribute,$value,$fail) use ($request) {
|
||||
if (! is_numeric($value) || $value > DomainController::NUMBER_MAX)
|
||||
$fail(sprintf('Point numbers must be between 0 and %d',DomainController::NUMBER_MAX));
|
||||
if (! is_numeric($value) || $value > Address::ADDRESS_FIELD_MAX)
|
||||
$fail(sprintf('Point numbers must be between 0 and %d',Address::ADDRESS_FIELD_MAX));
|
||||
|
||||
// Check that the host doesnt already exist
|
||||
$o = Address::where(function($query) use ($request,$value) {
|
||||
|
Reference in New Issue
Block a user