fix(career): preserve reviewed profile values
CI and Deploy / test (pull_request) Successful in 4m39s
CI and Deploy / deploy (pull_request) Has been skipped

Keep extraction heuristics out of manual save, version, and import paths so reviewed locations, URLs, dates, and languages round-trip unchanged.
This commit is contained in:
cesnimda
2026-08-15 16:56:31 +02:00
parent a6cffe0473
commit f0b9b222ff
15 changed files with 277 additions and 37 deletions
@@ -25,26 +25,47 @@ public static class CareerProfileValidator
foreach (var j in p.Jobs)
{
if (Over(j.Title, MaxShortField) || Over(j.Company, MaxShortField) || Over(j.Location, MaxShortField))
if (Over(j.Id, MaxShortField) || Over(j.Title, MaxShortField) || Over(j.Company, MaxShortField)
|| Over(j.Location, MaxShortField) || Over(j.Start, MaxShortField) || Over(j.End, MaxShortField))
return "An experience field exceeds the allowed length.";
if (j.Bullets.Count > MaxListEntries || j.Skills.Count > MaxListEntries) return "An experience has too many bullets/skills.";
if (j.Bullets.Any(b => Over(b, MaxLongField))) return "An experience bullet is too long.";
if (j.Bullets.Any(b => Over(b, MaxLongField)) || j.Skills.Any(s => Over(s, MaxShortField))) return "An experience bullet or skill is too long.";
}
foreach (var e in p.Education)
{
if (Over(e.Qualification, MaxShortField) || Over(e.Institution, MaxShortField)) return "An education field exceeds the allowed length.";
if (Over(e.Id, MaxShortField) || Over(e.Qualification, MaxShortField) || Over(e.QualificationLevel, MaxShortField)
|| Over(e.Institution, MaxShortField) || Over(e.Location, MaxShortField)
|| Over(e.Start, MaxShortField) || Over(e.End, MaxShortField)) return "An education field exceeds the allowed length.";
if (e.Details.Count > MaxListEntries) return "An education entry has too many details.";
if (e.Details.Any(detail => Over(detail, MaxLongField))) return "An education detail is too long.";
}
foreach (var pr in p.Projects)
{
if (Over(pr.Name, MaxShortField) || Over(pr.Role, MaxShortField)) return "A project field exceeds the allowed length.";
if (Over(pr.Id, MaxShortField) || Over(pr.Name, MaxShortField) || Over(pr.Role, MaxShortField)
|| Over(pr.Location, MaxShortField) || Over(pr.Start, MaxShortField) || Over(pr.End, MaxShortField)) return "A project field exceeds the allowed length.";
if (pr.Bullets.Count > MaxListEntries || pr.Skills.Count > MaxListEntries) return "A project has too many bullets/skills.";
if (pr.Bullets.Any(bullet => Over(bullet, MaxLongField)) || pr.Skills.Any(skill => Over(skill, MaxShortField))) return "A project bullet or skill is too long.";
}
foreach (var certification in p.Certifications)
{
if (Over(certification.Id, MaxShortField) || Over(certification.Name, MaxShortField)
|| Over(certification.Issuer, MaxShortField) || Over(certification.Location, MaxShortField)
|| Over(certification.Date, MaxShortField)) return "A certification field exceeds the allowed length.";
if (certification.Details.Count > MaxListEntries) return "A certification has too many details.";
if (certification.Details.Any(detail => Over(detail, MaxLongField))) return "A certification detail is too long.";
}
foreach (var language in p.Languages)
{
if (Over(language.Name, MaxShortField) || Over(language.Level, MaxShortField) || Over(language.Notes, MaxLongField))
return "A language field exceeds the allowed length.";
}
foreach (var s in p.Skills)
if (Over(s, MaxShortField)) return "A skill entry is too long.";
if (Over(p.Contact.FullName, MaxShortField) || Over(p.Contact.Email, MaxShortField)
|| Over(p.Contact.Headline, MaxShortField) || Over(p.Contact.Location, MaxShortField))
|| Over(p.Contact.Headline, MaxShortField) || Over(p.Contact.Phone, MaxShortField)
|| Over(p.Contact.Location, MaxShortField) || Over(p.Contact.Website, MaxShortField)
|| Over(p.Contact.LinkedIn, MaxShortField))
return "A contact field exceeds the allowed length.";
return null;