feat(validation): integrate ÖTO/FEI rule validations and centralized validators

- Added `OetoValidators` with live-validation for OEPS numbers, FEI-IDs, license classes, and horse data to align with ÖTO/FEI 2026 standards.
- Expanded `ReiterProfilViewModel` and `PferdProfilViewModel` to include validation states (`ValidationResult`) for enhanced form feedback and dirty state tracking.
- Standardized mock data in `Stores.kt` and `NennungModels.kt` to comply with updated validation rules.
- Created `OetoValidatorsTest` to ensure validation logic accuracy (30 unit tests, all green).
- Updated `build.gradle.kts` to include `kotlin.test` dependency for JVM testing.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-04-03 09:04:08 +02:00
parent 2c8d16b27f
commit 14b458860c
9 changed files with 631 additions and 28 deletions
@@ -88,12 +88,13 @@ object NennungMockData {
Pferd("1005", "Estrella", "Andalusier", "Schimmel", "Bauer Klaus", "Box 2"),
)
// lizenzNr: OEPS-Mitgliedsnummer im Format OEPS-NNNNNNN oder plain 7-8 Ziffern (Validierungsregeln.md §1)
val reiter = listOf(
Reiter("2001", "Hans", "Müller", "RV Neumarkt", "AT-12345", true, 0.0),
Reiter("2002", "Maria", "Huber", "RV Salzburg", "AT-23456", true, -45.0),
Reiter("2003", "Josef", "Gruber", "RV Wien", "AT-34567", false, 0.0),
Reiter("2004", "Anna", "Wagner", "RV Graz", "AT-45678", true, 120.0),
Reiter("2005", "Klaus", "Bauer", "RV Linz", "AT-56789", true, 0.0),
Reiter("2001", "Hans", "Müller", "RV Neumarkt", "OEPS-1234567", true, 0.0),
Reiter("2002", "Maria", "Huber", "RV Salzburg", "OEPS-2345678", true, -45.0),
Reiter("2003", "Josef", "Gruber", "RV Wien", "OEPS-3456789", false, 0.0),
Reiter("2004", "Anna", "Wagner", "RV Graz", "OEPS-4567890", true, 120.0),
Reiter("2005", "Klaus", "Bauer", "RV Linz", "OEPS-5678901", true, 0.0),
)
val verkaufArtikel = listOf(