/// <inheritdoc /> public void Validate(string errorLocation, string propertyPath = "") { FulcrumValidate.IsNotNull(Key, nameof(Key), errorLocation); FulcrumValidate.IsValidated(Key, propertyPath, nameof(Key), errorLocation); FulcrumValidate.IsNotNull(AssociatedKeys, nameof(AssociatedKeys), errorLocation); FulcrumValidate.IsValidated(AssociatedKeys, propertyPath, nameof(AssociatedKeys), errorLocation); }
/// <inheritdoc /> public void Validate(string errorLocation, string propertyPath = "") { FulcrumValidate.IsValidated(PageInfo, propertyPath, nameof(PageInfo), errorLocation); if (!FulcrumApplication.IsInProduction) { FulcrumValidate.AreEqual(PageInfo.Returned, Data.Count(), nameof(Data), $"Validation of {nameof(PageEnvelope<T>)} failed. The number of items in {nameof(Data)} ({Data.Count()}) must be the same as {nameof(PageInfo.Returned)} ({PageInfo.Returned})."); } }
/// <inheritdoc /> public void Validate(string errorLocation, string propertyPath = "") { FulcrumValidate.IsNotNullOrWhiteSpace(Name, nameof(Name), errorLocation); FulcrumValidate.AreNotEqual(RunTimeLevelEnum.None, RunTimeLevel, nameof(RunTimeLevel), errorLocation); FulcrumValidate.IsValidated(Tenant, propertyPath, nameof(Tenant), errorLocation); FulcrumValidate.IsNotNull(ThreadHandler, nameof(ThreadHandler), errorLocation); FulcrumValidate.IsNotNull(SynchronousFastLogger, nameof(SynchronousFastLogger), errorLocation); FulcrumValidate.IsNotNull(FallbackLogger, nameof(FallbackLogger), errorLocation); }
/// <inheritdoc/> public override void Validate(string errorLocaction, string propertyPath = "") { FulcrumValidate.IsNotNull(Id, nameof(Id), errorLocaction); FulcrumValidate.IsValidated(Id, propertyPath, nameof(Id), errorLocaction); FulcrumValidate.IsNotNullOrWhiteSpace(Name, nameof(Name), errorLocaction); FulcrumValidate.IsTrue(Regex.IsMatch(Name, "^[a-zA-Z]+$"), errorLocaction, $"Property {nameof(Name)} must only consist of upper or lower case a-z."); FulcrumValidate.IsNotNullOrWhiteSpace(Category, nameof(Category), errorLocaction); FulcrumValidate.IsTrue(Regex.IsMatch(Category, "^[a-zA-Z]+$"), errorLocaction, $"Property {nameof(Category)} must only consist of upper or lower case a-z."); FulcrumValidate.IsGreaterThanOrEqualTo(0.0, Price, nameof(Price), errorLocaction); FulcrumValidate.IsNotDefaultValue(DateAdded, nameof(DateAdded), errorLocaction); FulcrumValidate.IsLessThanOrEqualTo(DateTimeOffset.Now, DateAdded, nameof(DateAdded), errorLocaction); }
/// <inheritdoc /> public virtual void Validate(string errorLocation, string propertyPath = "") { FulcrumValidate.IsValidated(Features, propertyPath, nameof(Features), errorLocation); }
/// <inheritdoc /> public virtual void Validate(string errorLocation, string propertyPath = "") { FulcrumValidate.IsNotNullOrWhiteSpace(Name, nameof(Name), errorLocation); FulcrumValidate.IsNotNull(Addresses, nameof(Addresses), errorLocation); FulcrumValidate.IsValidated(Addresses, propertyPath, nameof(Addresses), errorLocation); }