Task #19407
Updated by Redmine Admin 5 days ago
The system should enforce validation rules depending on whether the client is an individual or a company, ensuring the uniqueness of identification numbers during both client creation and client updates. **Acceptance Criteria** **Scenario 1: Individual & Local Client – TAN Validation** Given the client type selected is Individual & Local\ Individual\ When the user enters a TAN during client creation or update\ Then the system must validate that the TAN is unique\ And prevent saving the client if the TAN already exists\ And display an appropriate validation error message. **Scenario 2: Company Client & Local– – BRN & VAT Validation** Given the client type selected is Company\ When the user enters a BRN and/or VAT number during client creation or update\ Then the system must validate that both BRN and VAT are unique\ And prevent saving the client if either BRN or VAT already exists\ And display an appropriate validation error message indicating which value is duplicated. **Scenario 3: Update Existing Client** Given an existing client is being updated\ When the identification values (TAN, BRN, or VAT) are changed\ Then the system must re-validate uniqueness against all other clients\ And allow saving only if no duplicates are found. Validation messages must be clear and user-friendly * Example: * _“A client with this TAN already exists.”_ * _“A client with this BRN/VAT already exists.”_