private bool HasValidValues(InputLine password) { return(IsValidRange(password.Fields["byr"], 1920, 2002) && IsValidRange(password.Fields["iyr"], 2010, 2020) && IsValidRange(password.Fields["eyr"], 2020, 2030) && IsValidHeight(password.Fields["hgt"]) && IsValidHairColor(password.Fields["hcl"]) && IsValidEyeColor(password.Fields["ecl"]) && IsValidPasswordId(password.Fields["pid"])); }
private bool IsValid(InputLine password) { return(_requiredFields.All(requiredField => password.Fields.ContainsKey(requiredField))); }