1+ using System . ComponentModel . DataAnnotations ;
12using Newtonsoft . Json ;
23
34namespace fluXis . Online . API . Payloads . Users ;
@@ -10,32 +11,41 @@ public class UserProfileUpdatePayload
1011 /// base64 encoded image
1112 /// </summary>
1213 [ JsonProperty ( "avatar" ) ]
14+ [ Base64String ]
1315 public string ? Avatar { get ; set ; }
1416
1517 /// <summary>
1618 /// base64 encoded image
1719 /// </summary>
1820 [ JsonProperty ( "banner" ) ]
21+ [ Base64String ]
1922 public string ? Banner { get ; set ; }
2023
2124 [ JsonProperty ( "nick" ) ]
25+ [ RegularExpression ( "^.{2,24}$" , ErrorMessage = "Display name must be between 2-24 characters." ) ]
2226 public string ? DisplayName { get ; set ; }
2327
2428 [ JsonProperty ( "about" ) ]
29+ [ MaxLength ( 256 , ErrorMessage = "AboutMe must be shorter than 256 characters." ) ]
2530 public string ? AboutMe { get ; set ; }
2631
2732 [ JsonProperty ( "twitter" ) ]
33+ [ RegularExpression ( "^.{1,15}$" , ErrorMessage = "Twitter handle must be between 1-15 characters." ) ]
2834 public string ? Twitter { get ; set ; }
2935
3036 [ JsonProperty ( "discord" ) ]
37+ [ RegularExpression ( "^.{2,32}$" , ErrorMessage = "Discord handle must be between 2-32 characters." ) ]
3138 public string ? Discord { get ; set ; }
3239
3340 [ JsonProperty ( "twitch" ) ]
41+ [ RegularExpression ( "^.{4,25}$" , ErrorMessage = "Twitch handle must be between 4-25 characters." ) ]
3442 public string ? Twitch { get ; set ; }
3543
3644 [ JsonProperty ( "youtube" ) ]
45+ [ RegularExpression ( "^.{1,30}$" , ErrorMessage = "YouTube handle must be between 1-30 characters." ) ]
3746 public string ? YouTube { get ; set ; }
3847
3948 [ JsonProperty ( "pronouns" ) ]
49+ [ MaxLength ( 16 , ErrorMessage = "Pronouns must be shorter than 16 characters." ) ]
4050 public string ? Pronouns { get ; set ; }
4151}
0 commit comments