Originally posted by **djhohnstein** September 20, 2024
Hey everyone, new to Avalonia. Had a question about displaying validation errors and the MVVM toolkit.
I have the following ViewModel:
```c#
public class CustomViewModel : ViewModelBase {
[ObservableProperty]
[NotifyDataErrorInfo]
[CustomValidation(typeof(SharedDefinitions),
nameof(SharedDefinitions.ValidateTextAlphaNumeric))]
[Required]
private string _name;
...
}
```
Let's say I have the corresponding UserControl with the following defined:
```xml
```
Upon the rendering of my view and entering of data into the `TextBox` element, I see that the outline of this box properly changes to red when a validation error occurs from the `ValidateTextAlphaNumeric` function (which returns a `ValidationResult` object), but the error message of that `ValidationResult` is **not** rendered on the corresponding TextBox hint. Is it possible to show the validation errors for that field on the text box?
Discussed in https://github.com/AvaloniaCommunity/Material.Avalonia/discussions/401