Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-b1
-
Component/s: None
-
Labels:None
Description
See https://github.com/blesta/module-pterodactyl/issues/65
Pterodactyl allows a value -1 to give unlimited Swap. We should allow this for the package field as well. Update the error message to mention that -1 is valid and update the validation rule
In components/modules/pterodactyl/pterodactyl.php around line 408 change
'meta[swap]' => [
'format' => [
'rule' => ['matches', '/^[0-9]+$/'],
'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
]
],
To
'meta[swap]' => [
'format' => [
'rule' => ['matches', '/^(?:\-1|[0-9]+)$/'],
'message' => Language::_('PterodactylPackage.!error.meta[swap].format', true)
]
],