Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/Http/Requests/Customer/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function rules(): array
'autsys' => 'int|min:1',
'maxprefixes' => 'nullable|int|min:0',
'peeringemail' => 'email',
'peeringmacro' => 'nullable|string|max:255',
'peeringmacrov6' => 'nullable|string|max:255',
'peeringmacro' => [ 'nullable', 'string', 'max:255', 'regex:/^(AS-[A-Z0-9]+(?:-[A-Z0-9]+)*|AS[1-9]\d*(?::AS-[A-Z0-9]+(?:-[A-Z0-9]+)*)?)$/i' ],
'peeringmacrov6' => [ 'nullable', 'string', 'max:255', 'regex:/^(AS-[A-Z0-9]+(?:-[A-Z0-9]+)*|AS[1-9]\d*(?::AS-[A-Z0-9]+(?:-[A-Z0-9]+)*)?)$/i' ],
'peeringpolicy' => 'string|in:' . implode( ',', array_keys( Customer::$PEERING_POLICIES ) ),
'irrdb' => 'nullable|integer|exists:irrdbconfig,id',
'nocphone' => 'nullable|string|max:255',
Expand All @@ -90,6 +90,7 @@ public function rules(): array
'reseller' => 'nullable|integer|exists:cust,id',
];


return $this->type == Customer::TYPE_ASSOCIATE ? $validateCommonDetails : array_merge( $validateCommonDetails, $validateOtherDetails ) ;
}

Expand Down
7 changes: 4 additions & 3 deletions resources/views/customer/edit.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,16 @@
->label( 'IPv4 Peering Macro' )
->placeholder( "AS-ACME-EXAMPLE" )
->blockHelp( "The IPv4 Peering Macro is used instead of the AS number when set to generate inbound prefix filters for the "
. "route servers based on the member's published IRR records." );
. "route servers based on the member's published IRR records. Must be a valid as-macro. One of:<br><code>ASNNNNN, AS-MACRONAME, ASNNNNN:AS-MACRONAME</code><br>");
?>

<?= Former::text( 'peeringmacrov6' )
->label( 'IPv6 Peering Macro' )
->placeholder( "AS-ACME-V6-EXAMPLE" )
->blockHelp( "In the event that IPv6 Peering Macro is set, this will be used to generate IPv6 inbound prefix filters, "
. "otherwise the IPv4 Peering Macro will be used for both. If neither is set, the IRR policy of the AS number will "
. "be used. Use <code>AS-NULL</code> to disable one or the other protocol peering macro if only one is required." );
. "be used. Use <code>AS-NULL</code> to disable one or the other protocol peering macro if only one is required. "
. "Must be a valid as-macro. One of:<br><code>ASNNNNN, AS-MACRONAME, ASNNNNN:AS-MACRONAME</code><br>" );
?>

<?= Former::select( 'peeringpolicy' )
Expand Down