Skip to content

Commit

Permalink
Rename PartOfSpeechIdValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Jan 8, 2025
1 parent c3f0908 commit 0a39681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace MiniLcm.Validators;

public class PartOfSpeechIdValidator : AbstractValidator<Guid?>
public class IsCanonicalPartOfSpeechGuidValidator : AbstractValidator<Guid?>
{
public PartOfSpeechIdValidator()
public IsCanonicalPartOfSpeechGuidValidator()
{
RuleFor(id => id).Must(BeCanonicalGuid);
}
Expand Down
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()); // Can't do this statelessly, as we'd need a full PartOfSpeech object to check if it's predefined or not
// RuleFor(s => s.PartOfSpeechId).SetValidator(new IsCanonicalPartOfSpeechGuidValidator()); // 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 0a39681

Please sign in to comment.