Move form state ownership from Home to leaf controls

This commit is contained in:
2026-02-26 09:54:04 +01:00
parent b17490e5ac
commit 4d728f91cf
16 changed files with 315 additions and 143 deletions

View File

@@ -14,6 +14,13 @@ public sealed class FormState<TModel>
}
}
public sealed class FormSubmissionResult
{
public Dictionary<string, string> Errors { get; init; } = [];
public string? ErrorMessage { get; init; }
public bool IsSuccess => Errors.Count == 0 && string.IsNullOrWhiteSpace(ErrorMessage);
}
public sealed class RegisterFormModel
{
public string Username { get; set; } = string.Empty;