public void Validate(int index, IList <ValidationError> errors) { var prefix = $"Fields.{index}"; if (!Partitioning.IsValidPartitioning()) { errors.Add(new ValidationError("Partitioning is not valid.", $"{prefix}.{nameof(Partitioning)}")); } if (!Name.IsPropertyName()) { errors.Add(new ValidationError("Name must be a valid property name.", $"{prefix}.{nameof(Name)}")); } if (Properties == null) { errors.Add(new ValidationError("Properties must be defined.", $"{prefix}.{nameof(Properties)}")); } else { var propertyErrors = FieldPropertiesValidator.Validate(Properties); foreach (var error in propertyErrors) { errors.Add(error); } } }
public void Validate(IList <ValidationError> errors) { if (!Partitioning.IsValidPartitioning()) { errors.Add(new ValidationError("Partitioning is not valid.", nameof(Partitioning))); } if (!Name.IsPropertyName()) { errors.Add(new ValidationError("Name must be a valid property name.", nameof(Name))); } if (Properties == null) { errors.Add(new ValidationError("Properties must be defined.", nameof(Properties))); } else { var propertyErrors = FieldPropertiesValidator.Validate(Properties); foreach (var error in propertyErrors) { errors.Add(error); } } }
public void Validate(IList <ValidationError> errors) { if (!Partitioning.IsValidPartitioning()) { errors.Add(new ValidationError("Partitioning is not valid.", nameof(Partitioning))); } if (!Name.IsPropertyName()) { errors.Add(new ValidationError("Name must be a valid property name.", nameof(Name))); } if (Properties == null) { errors.Add(new ValidationError("Properties must be defined.", nameof(Properties))); } }