public class RunicValidationResult : ValidationResult, IRunicTextReferenceSource A ValidationResult with a text reference, for DataAnnotations and CommunityToolkit ObservableValidator: return it from a ValidationAttribute or a CustomValidationAttribute method, and the page shows RunicValidationResult.Text in the window's language, with ValidationResult.ErrorMessage as the fallback.
Constructors
RunicValidationResult
public RunicValidationResult(string? errorMessage, RunicTextReference? text, IEnumerable<string>? memberNames = null) Creates a result with a message, its text reference and the members it reports.
Parameters
errorMessageThe message, shown where the page cannot translate
text.textThe text reference.
memberNamesThe members the result reports, as for
ValidationResult.
RunicValidationResult
protected RunicValidationResult(RunicValidationResult validationResult) Copies a result.
Properties
Text
public RunicTextReference? Text { get; } The text reference, or null to show the message.
Documentation from IRunicTextReferenceSource.Text.