Skip to content

Enforce input validation with FluentValidation #66

@nanotaboada

Description

@nanotaboada

Description

Improve the API’s request validation by integrating FluentValidation. This will provide a clean and expressive way to define validation rules for input models (e.g., PlayerRequestModel), replacing manual checks in controllers and ensuring a consistent validation strategy.

The FluentValidation.AspNetCore package is no longer being maintained and is now unsupported. We encourage users move away from this package and use the core FluentValidation package with a manual validation approach as detailed at https://docs.fluentvalidation.net/en/latest/aspnet.html

Acceptance Criteria

  • Install and configure FluentValidation in the project.
  • Create validators for all input models (PlayerRequestModel, etc.).
  • Ensure validation rules are complete (e.g., required fields, formats, value ranges).
  • Add unit tests to verify validation logic.

Resources

Metadata

Metadata

Assignees

Labels

.NETPull requests that update .NET codeenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions