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
@@ -98,7 +98,7 @@ object StoreV2 {
geburtsdatum = "2001-01-01",
besitzer = "Isabell Werth",
lebensnummer = "DE 431316694401",
oepsNummer = "3H66"
oepsNummer = "3456601" // OEPS-Format: 7 Ziffern (Validierungsregeln.md §1)
),
Pferd(
id = 2,
@@ -111,7 +111,7 @@ object StoreV2 {
geburtsdatum = "2004-01-01",
besitzer = "Madeleine Winter-Schulze",
lebensnummer = "DE 443434443904",
oepsNummer = "2T15"
oepsNummer = "2345602" // OEPS-Format: 7 Ziffern
),
Pferd(
id = 3,
@@ -124,7 +124,7 @@ object StoreV2 {
geburtsdatum = "2002-01-01",
besitzer = "Carl Hester & Roly Luard",
lebensnummer = "NLD003NL0204840",
oepsNummer = "1V51"
oepsNummer = "1234603" // OEPS-Format: 7 Ziffern
),
Pferd(
id = 4,
@@ -137,7 +137,7 @@ object StoreV2 {
geburtsdatum = "2007-01-01",
besitzer = "Beatrice Bürchler-Keller",
lebensnummer = "DE 409090124007",
oepsNummer = "4U89"
oepsNummer = "4567604" // OEPS-Format: 7 Ziffern
),
)
@@ -146,10 +146,10 @@ object StoreV2 {
id = 1,
vorname = "Isabell",
nachname = "Werth",
oepsNummer = "O-12345",
oepsNummer = "OEPS-1234567", // OEPS-Format: Präfix + 7 Ziffern
feiId = "10011469",
verein = "RFV Graf von Schmettow Eversael",
lizenzKlasse = "RD4",
lizenzKlasse = "RD3", // Höchste Dressur-Lizenz gemäß ÖTO (Validierungsregeln.md §3)
startkartAktiv = true,
startkartSaison = 2026,
nation = "GER"
@@ -158,10 +158,10 @@ object StoreV2 {
id = 2,
vorname = "Jessica",
nachname = "von Bredow-Werndl",
oepsNummer = "O-54321",
oepsNummer = "OEPS-2345678",
feiId = "10019075",
verein = "RFV Aubenhausen",
lizenzKlasse = "RD4",
lizenzKlasse = "RD3",
startkartAktiv = true,
startkartSaison = 2026,
nation = "GER"
@@ -170,10 +170,10 @@ object StoreV2 {
id = 3,
vorname = "Charlotte",
nachname = "Dujardin",
oepsNummer = "GB-9999",
oepsNummer = "OEPS-3456789", // Hinweis: Internationale Reiter haben ggf. keine OEPS-Nr. — Platzhalter
feiId = "10028445",
verein = "Rowallan Activity Centre",
lizenzKlasse = "RD4",
lizenzKlasse = "RD3",
startkartAktiv = true,
startkartSaison = 2026,
nation = "GBR"
@@ -182,10 +182,10 @@ object StoreV2 {
id = 4,
vorname = "Stefan",
nachname = "Moser",
oepsNummer = "O-44332",
oepsNummer = "OEPS-4456789",
feiId = "10011111",
verein = "URFV Neumarkt/M.",
lizenzKlasse = "R2D2",
lizenzKlasse = "R2", // Gültige Springen-Lizenz gemäß ÖTO (Validierungsregeln.md §3)
startkartAktiv = true,
startkartSaison = 2026,
nation = "AUT",