Description
Currently, the validation logic resides within the RegisterPage.cs and PersonalInfoPage.cs files. To improve maintainability, testability, and separation of concerns, this logic should be moved into a dedicated Validation Service.
Requirements
- Create a new Validation Service (e.g.,
IValidationService and ValidationService).
- Move all existing validation methods from
RegisterPage.cs and PersonalInfoPage.cs into the new service.
- Each validation method:
- Should be asynchronous (
Task<bool> return type).
- Should return a boolean indicating whether the validation was successful.
- Inject the validation service using the application's Dependency Injection (DI) system.
- Update all existing references in
RegisterPage.cs and PersonalInfoPage.cs to use the new service instead of inline logic.
Acceptance Criteria
- All validation logic is centralized in the
ValidationService.
- Methods are async and return
Task<bool>.
RegisterPage.cs and PersonalInfoPage.cs no longer contain direct validation logic.
ValidationService is correctly registered in DI and used where needed.
Description
Currently, the validation logic resides within the
RegisterPage.csandPersonalInfoPage.csfiles. To improve maintainability, testability, and separation of concerns, this logic should be moved into a dedicated Validation Service.Requirements
IValidationServiceandValidationService).RegisterPage.csandPersonalInfoPage.csinto the new service.Task<bool>return type).RegisterPage.csandPersonalInfoPage.csto use the new service instead of inline logic.Acceptance Criteria
ValidationService.Task<bool>.RegisterPage.csandPersonalInfoPage.csno longer contain direct validation logic.ValidationServiceis correctly registered in DI and used where needed.