public GetErrors ( string propertyName ) : IEnumerable | ||
propertyName | string | |
return | IEnumerable |
public IEnumerable GetErrors(string propertyName) {
switch (propertyName) {
case nameof(Text):
return Required && string.IsNullOrWhiteSpace(Text) ? new[] { "Required value" } : null;
default:
return null;
}
}