Skip to content
Nuvyntra Labs

Documentation

Validation

IValidator and DataAnnotations in the Validation package; FluentValidation and XAML Validation.For stay optional.

IValidator

Plugin.Maui.MVVMExpress.Validation targets net10.0 and depends on Core only. DataAnnotationsValidator is the default. FluentValidation is an adapter the app may add — it is not a PackageReference of the Validation package. 1.3.0 also roots Core forms, Navigation, Dialogs, and Pagination in ILLink descriptors.

public sealed class ProductDraft
{
    [Required, StringLength(80)]
    public string Name { get; set; } = "";

    [Range(0.01, 1_000_000)]
    public decimal Price { get; set; }
}

var summary = await validator.ValidateAsync(draft, cancellationToken);
if (!summary.IsValid)
{
    return Outcome.Failure("validation", summary.Messages[0].Message);
}

XAML Validation.For remains Plugin.Maui.FormValidation. FormViewModel, FormField, dirty state, and undo/redo ship in Core — see Forms.

Discussion

Comment on Plugin.Maui.MVVMExpress. The thread lives on this component's GitHub repository (nuvyntralabs/Plugin.Maui.MVVMExpress). Sign in with GitHub — Giscus uses Discussions, Utterances uses Issues.