Display Validation Errors on TextBox #401
-
Hey everyone, new to Avalonia. Had a question about displaying validation errors and the MVVM toolkit. I have the following ViewModel: 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: <Grid RowDefinitions="*" ColumnDefinitions="Auto,*">
<TextBlock
VerticalAlignment="Center"
FontSize="18"
FontWeight="Bold"
Margin="0 0 40 0"
Grid.Row="0" Grid.Column="0" Text="Name:" />
<TextBox
Grid.Row="0" Grid.Column="1"
assists:TextFieldAssist.Hints="{StaticResource AlphaNumericOnly}"
Text="{Binding Name}" />
</Grid> Upon the rendering of my view and entering of data into the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Seems like this bug, since before it showns below the textbox. I'll take a look. You can track progress at #402 |
Beta Was this translation helpful? Give feedback.
Seems like this bug, since before it showns below the textbox. I'll take a look. You can track progress at #402