Radical 2.0.0 to Radical 2.1.0
In version 2.1.0 the IRequireValidationCallback<TViewModel> has been obsolted. It'll be removed in version 3.0.0. The IRequireValidationCallback<> behavior can be replaced by using a custom validation rule, like in the following snippet:
1
class SampleViewModel : AbstractViewModel, IRequireValidation
2
{
3
public SampleViewModel()
4
{
5
ValidationService = new DataAnnotationValidationService<SampleViewModel>( this )
6
.AddRule
7
(
8
property: () => this.Text,
9
rule: ctx => ctx.Failed("This is the error message.")
10
);
11
}
12
}
Copied!
Copy link