Skip to content

Commit

Permalink
Don't check part of speech GUIDs yet
Browse files Browse the repository at this point in the history
As long as senses only have a PartOfSpeechId in them, it's hard to check
that property statelessly because we need to look up the PartOfSpeech in
order to determine whether it's predefined (and thus whether its GUID
needs to match one of the canonical GUIDs). For now, we'll skip checking
part of speech GUIDs until senses have an actual PartOfSpeech reference.
  • Loading branch information
rmunn committed Jan 7, 2025
1 parent 3bcd237 commit 7f38246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/FwLite/MiniLcm/Validators/SenseValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public SenseValidator()
RuleFor(s => s.Definition).NoEmptyValues();
RuleFor(s => s.Gloss).NoEmptyValues();
// RuleFor(s => s.PartOfSpeech).Empty(); // TODO: Comment out if we're not yet ready to move away from strings
RuleFor(s => s.PartOfSpeechId).SetValidator(new PartOfSpeechIdValidator());
// RuleFor(s => s.PartOfSpeechId).SetValidator(new PartOfSpeechIdValidator()); // Can't do this statelessly, as we'd need a full PartOfSpeech object to check if it's predefined or not
RuleForEach(s => s.SemanticDomains).SetValidator(new SemanticDomainValidator());
RuleForEach(s => s.ExampleSentences).SetValidator(sense => new ExampleSentenceValidator(sense));
}
Expand Down

0 comments on commit 7f38246

Please sign in to comment.