Fix: External identifier validation error handling#5553
Open
KroZen-Dev wants to merge 5 commits intopterodactyl:1.0-developfrom
Open
Fix: External identifier validation error handling#5553KroZen-Dev wants to merge 5 commits intopterodactyl:1.0-developfrom
KroZen-Dev wants to merge 5 commits intopterodactyl:1.0-developfrom
Conversation
Added validation for unique external_id when updating server details.
Add validation rules for updating server models.
Contributor
|
@KroZen-Dev instead of saying |
Author
Agreed, corrected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces stricter validation to ensure that the
external_idfield for servers remains unique when updating server details, and adds a utility method for update validation rules. The changes enhance data integrity and provide clearer error handling for duplicate external IDs.Validation Improvements:
external_idin theServersControllerupdate logic, throwing aValidationExceptionif a duplicate is found when updating a server.external_idinServerFormRequest, ensuring that form requests also enforce this rule and provide user-friendly error messages.Model Enhancements:
getRulesForUpdatein theServermodel to generate validation rules suitable for update operations, handling uniqueness checks and allowing for the exclusion of the current record.Ruleclass inServer.phpto support advanced validation rule definitions.🔗 Linked Issue:
#5549