[PR #10228] Replaced some magic values used in property attributes [MaxLength] and [StringLength] in data entities #12388

Closed
opened 2026-02-07 06:54:59 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/jellyfin/jellyfin/pull/10228

State: closed
Merged: No


Changes
The length of strings in many data entities is constrained by [MaxLength] and [StringLength] attributes, which are passed a numeric value. However, these constraints come without an explanation. In this pull request, those values that could be neatly represented by the MaxValue constants of numeric value types were changed accordingly. Presumably, these values of these constraints mean something, and this is a first step towards making the code more self-documenting. I envision that, in the future, it will all be named constants.

**Original Pull Request:** https://github.com/jellyfin/jellyfin/pull/10228 **State:** closed **Merged:** No --- **Changes** The length of strings in many data entities is constrained by `[MaxLength]` and `[StringLength]` attributes, which are passed a numeric value. However, these constraints come without an explanation. In this pull request, those values that could be neatly represented by the `MaxValue` constants of numeric value types were changed accordingly. Presumably, these values of these constraints mean _something_, and this is a first step towards making the code more self-documenting. I envision that, in the future, it will all be named constants.
OVERLORD added the pull-request label 2026-02-07 06:54:59 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#12388