[fix:] fixed issue where countires with shorter or longer plz's have been discriminated
This commit is contained in:
@@ -46,12 +46,16 @@ public class AddressCheck
|
|||||||
var address_component_count = 2; // cause anrede and name are first
|
var address_component_count = 2; // cause anrede and name are first
|
||||||
|
|
||||||
// Prüfung
|
// Prüfung
|
||||||
if (person.plz < 10000)
|
if ((person.plz < 10000 && string.IsNullOrWhiteSpace(person.land)) ||
|
||||||
|
(person.plz < 10000 && person.land == "GER") ||
|
||||||
|
(person.plz < 10000 && person.land == "DE"))
|
||||||
{
|
{
|
||||||
hasFaults = true;
|
hasFaults = true;
|
||||||
errors.Add(ErrorTypes.PlzTooShort);
|
errors.Add(ErrorTypes.PlzTooShort);
|
||||||
}
|
}
|
||||||
else if (person.plz > 99999)
|
else if ((person.plz > 99999 && string.IsNullOrWhiteSpace(person.land)) ||
|
||||||
|
(person.plz > 99999 && person.land == "GER") ||
|
||||||
|
(person.plz > 99999 && person.land == "DE"))
|
||||||
{
|
{
|
||||||
hasFaults = true;
|
hasFaults = true;
|
||||||
errors.Add(ErrorTypes.PlzTooLong);
|
errors.Add(ErrorTypes.PlzTooLong);
|
||||||
|
|||||||
Reference in New Issue
Block a user