20 lines
457 B
C#
20 lines
457 B
C#
using System.ComponentModel;
|
|
using System.Linq.Expressions;
|
|
|
|
namespace Toolkit.Foundation;
|
|
|
|
public interface IValidation :
|
|
INotifyPropertyChanged
|
|
{
|
|
IReadOnlyDictionary<string, string> Errors { get; }
|
|
|
|
bool HasErrors { get; }
|
|
|
|
void Add<TProperty>(Expression<Func<TProperty>> property,
|
|
ValidationRule[] rules,
|
|
ValidationTrigger trigger = ValidationTrigger.Deferred);
|
|
|
|
bool Validate();
|
|
|
|
bool Validate(string name);
|
|
} |