From 3447fa6eb1ce5834505f1bb19ecc69e3a330ef4c Mon Sep 17 00:00:00 2001 From: Maxime Adler Date: Mon, 14 Apr 2025 16:23:45 +0200 Subject: [PATCH] Add validation and gateway creation --- .../Games/Components/GameCreationForm.razor | 14 ++-- .../Components/GameCreationForm.razor.cs | 4 +- .../Components/GameCreationForm.razor.css | 9 ++- .../Pages/Games/Components/GameValidation.cs | 25 +++++++ .../Pages/Games/Gateways/GameGateway.cs | 14 ++++ .../Pages/Games/Gateways/IGameGateway.cs | 1 + .../Shared/Components/Popup/Popup.razor | 2 +- .../Shared/Components/Select/Select.razor.cs | 2 +- .../Shared/Constants/Endpoints.cs | 2 +- .../Exceptions/GameCreationException.cs | 3 + .../GameIdeas.BlazorApp/wwwroot/css/app.css | 4 -- .../CreateStaticResourceKey.cs | 2 + .../Constants/GlobalConstants.cs | 2 +- .../GameIdeas.WebAPI/Files/GameIdeas.fr.json | 66 ++++++++++--------- 14 files changed, 101 insertions(+), 49 deletions(-) create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameValidation.cs create mode 100644 src/GameIdeas/Client/GameIdeas.BlazorApp/Shared/Exceptions/GameCreationException.cs diff --git a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor index f257949..bfe8e8e 100644 --- a/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor +++ b/src/GameIdeas/Client/GameIdeas.BlazorApp/Pages/Games/Components/GameCreationForm.razor @@ -1,21 +1,23 @@ -@using GameIdeas.BlazorApp.Shared.Components.SelectSearch +@using Blazored.FluentValidation +@using GameIdeas.BlazorApp.Shared.Components.SelectSearch @using GameIdeas.BlazorApp.Shared.Components.Slider @using GameIdeas.Shared.Dto +
@ResourcesKey.Title :
- +
@ResourcesKey.ReleaseDate :
- +
@ResourcesKey.StorageSizeMo :
- +
@ResourcesKey.Developers :
@@ -61,14 +63,14 @@ {
@platform.Label :
- +
}
@ResourcesKey.Description :
- +