Add user-facing validation for DB-enforced length limits of string properties #38
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.
Closes #37.
Similarly to #36, this won't make the submission not-fail, but errors won't get reported to sentry and users will get better feedback about why their map won't upload.
This also moves the romanised validations from #24 to the built-in data annotations machinery as it's honestly just easier to not reinvent the wheel, and the declarativeness of the syntax is also nice. There is one tradeoff however in not being able to print the values that get validated out which isn't great.
The limits were taken from my local db which is what osu-web sets up so it may be a good idea to double-check these against production.