Move form state ownership from Home to leaf controls
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user