The Validation module allows users to define and manage validation rules at runtime and persist them in the database. This mirrors the capabilities of built-in XAF validation attributes and rules but adds the ability to configure and modify them dynamically through the UI. With this module, users can enforce business logic and data integrity without needing to modify source code, offering a more adaptable and maintainable validation strategy.
This module requires the XPO or EF specific module to be added to your solution to function.
The Validation module allows users to define and manage validation rules at runtime and persist them in the database. This mirrors the capabilities of built-in XAF validation attributes and rules but adds the ability to configure and modify them dynamically through the UI. With this module, users can enforce business logic and data integrity without needing to modify source code, offering a more adaptable and maintainable validation strategy.
This module requires the XPO or EF specific module to be added to your solution to function.
Install the relevant ORM-specific module:
Install-Package 'Llamachant.ExpressApp.Validation.Xpo'
Install-Package 'Llamachant.ExpressApp.Validation.EF'
Register the relevant ORM-specific module (either Xpo or EF Core):
public override void Setup(XafApplication application) {
base.Setup(application);
// Xpo:
this.RequiredModuleTypes.Add(typeof(LlamachantFrameworkValidationModuleXpo));
// EF Core:
this.RequiredModuleTypes.Add(typeof(LlamachantFrameworkValidationModuleEF));
}
OR
services.AddXaf(Configuration, builder => {
builder.UseApplication<ExpressAppBlazorApplication>();
builder.Modules
// Xpo:
.AddLlamachantFrameworkValidationModuleXpo();
// EF Core:
.AddLlamachantFrameworkValidationModuleEF();
});
Once the module is installed and registered, you can create new Validation Rules at runtime.
Install the relevant ORM-specific module:
Install-Package 'Llamachant.ExpressApp.Validation.Xpo'
Install-Package 'Llamachant.ExpressApp.Validation.EF'
Register the relevant ORM-specific module (either Xpo or EF Core):
public override void Setup(XafApplication application) {
base.Setup(application);
// Xpo:
this.RequiredModuleTypes.Add(typeof(LlamachantFrameworkValidationModuleXpo));
// EF Core:
this.RequiredModuleTypes.Add(typeof(LlamachantFrameworkValidationModuleEF));
}
OR
services.AddXaf(Configuration, builder => {
builder.UseApplication<ExpressAppBlazorApplication>();
builder.Modules
// Xpo:
.AddLlamachantFrameworkValidationModuleXpo();
// EF Core:
.AddLlamachantFrameworkValidationModuleEF();
});
Once the module is installed and registered, you can create new Validation Rules at runtime.