chore: add avalonia DataValidationErrors demo.

This commit is contained in:
NaBian committed 2025-08-06 22:09:56 +08:00
1 parent 5de152b20e
commit aa67dea033
8 files changed
+246 -162

No files matched your search

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using CommunityToolkit.Mvvm.ComponentModel;
namespace HandyControlDemo.ViewModel;
public partial class InputElementDemoViewModel : ObservableValidator
{
[Required] [EmailAddress] [ObservableProperty] [NotifyDataErrorInfo]
private string? _email1;
[Required] [EmailAddress] [ObservableProperty] [NotifyDataErrorInfo]
private string? _email2;
[Required] [ObservableProperty] [NotifyDataErrorInfo]
private string? _text1;
[Required] [ObservableProperty] [NotifyDataErrorInfo]
private string? _text2;
}