namespace Core.Validation; /// /// Interface for all validation rules /// /// Type of entity being validated (Student, Team, StudentEventStatistics, etc.) public interface IValidationRule { /// /// Execute the validation rule against an entity /// /// Entity to validate /// Validation configuration /// Validation warning if rule is violated, null otherwise ValidationWarning? Validate(TEntity entity, ValidationConfiguration config); /// /// Determines if this rule applies to the given context /// /// Validation context /// True if the rule should be executed in this context bool AppliesTo(ValidationContext context); }