Interface ICustomValidation
Assembly: LemonEdge.API.dll
Syntax
[EntityDefinition(EntityID.CustomValidation, "dbo.LT_CustomValidations", "CustomValidation", IsStandingDataEntity = true, LabelColumn = "Name")]
[DefaultEntityIcon(ImageType.Warning)]
public interface ICustomValidation : IBaseEntityWithPermissions, ISetCopier, IHasFolderStructure, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Properties
ContextType
The type of item to to use as the formula context
Declaration
[EntityProperty(SQLType.NVarChar, 2000, true)]
[EntityDescription("The type of item to to use as the formula context.")]
string ContextType { get; set; }
Property Value
EntityTypeID
[Key] Indicates what entity you want to provide validation for
Declaration
[EntityProperty(SQLType.UniqueIdentifier, false, IsEntityTypeLink = true)]
[RequiredNoDefaultIDValidation]
[EntityDescription("Indicates what entity you want to provide validation for")]
Guid EntityTypeID { get; set; }
Property Value
IsEnabled
Indicates if the validation is currently enforced throughout the platform, and through which methods
Declaration
[EntityProperty(SQLType.SmallInt, false, "1")]
[EntityDescription("Indicates if the validation is currently enforced throughout the platform, and through which methods")]
CustomValidationTrigger IsEnabled { get; set; }
Property Value
Name
Declaration
[EntityProperty(SQLType.NVarChar, 500, false, "''")]
[EntityKeyProperty]
[Unique]
string Name { get; set; }
Property Value
Sequence
Holds the the order this validation is evaluated in within the context of other validations.
Declaration
[EntityProperty(SQLType.SmallInt, false, "1")]
[EntityDescription("Holds the the order this validation is evaluated in within the context of other validations.")]
[EntitySequence]
short Sequence { get; set; }
Property Value
Type
Indicates when the validation will be checked
Declaration
[EntityProperty(SQLType.SmallInt, false, "1")]
[RequiredNoDefaultIDValidation]
[EntityDescription("Indicates the formula that is parsed an applied against any instance of the specified entitytype when saving changes.")]
CustomValidationType Type { get; set; }
Property Value
The formula that is parsed and applied against any instance of the specified entitytype when saving changes. Returns true if valid.
Declaration
[EntityProperty(SQLType.NVarChar, false)]
[RequiredNoDefaultIDValidation]
[EntityDescription("The formula that is parsed and applied against any instance of the specified entitytype when saving changes. Returns true if valid.")]
string ValidationFormula { get; set; }
Property Value
ValidationMessage
If the validation fails returning false, this is the message displayed. You can use {} to wrap property values in the message.
Declaration
[EntityProperty(SQLType.NVarChar, false, "''")]
[RequiredNoDefaultIDValidation]
[EntityDescription("If the validation fails returning false, this is the message displayed. You can use {} to wrap property values in the message.")]
string ValidationMessage { get; set; }
Property Value
Extension Methods