From b67a26248d5dde4c3909c29b92b8a182248bdcc1 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Wed, 23 Oct 2019 20:41:19 +0800 Subject: ... --- Timeline/Models/Http/User.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Timeline/Models/Http/User.cs') diff --git a/Timeline/Models/Http/User.cs b/Timeline/Models/Http/User.cs index 98406fec..516c1329 100644 --- a/Timeline/Models/Http/User.cs +++ b/Timeline/Models/Http/User.cs @@ -20,9 +20,11 @@ namespace Timeline.Models.Http public class ChangeUsernameRequest { [Required] + [Username] public string OldUsername { get; set; } = default!; - [Required, ValidateWith(typeof(UsernameValidator))] + [Required] + [Username] public string NewUsername { get; set; } = default!; } -- cgit v1.2.3