Update model

This commit is contained in:
2023-05-13 22:51:20 +02:00
parent f49f7534e9
commit 4d78cdd8a5
15 changed files with 121 additions and 33 deletions

View File

@ -67,7 +67,7 @@ namespace Elwig.Helpers {
return new(false, "PLZ zu kurz");
}
int plz = int.Parse(input.Text);
if (!ctx.Postleitzahlen.Any(p => p.Plz == plz)) {
if (ctx.Postleitzahlen.Find(plz) == null) {
return new(false, "Ungültige PLZ");
}
return new(true, null);