I have a textbox for example that is bound via the mvvm pattern like this:
<TextBox VerticalAlignment="Center" Grid.Column="2" Grid.Row="1" Validation.ErrorTemplate="{StaticResource ValidationErrorTemplate}">
<TextBox.Text>
<Binding Path="Entity.LastName" NotifyOnValidationError="True">
<Binding.ValidationRules>
<validations:MandatoryValidationRule/>
This specific rule checks if any value was entered to the textbox. However, this rule is activated only when a user enters some text and then deletes it. Most times, when a user leaves out a blank field, its because he forgot to fill it.
So, how can i, from the view model, force all validation rules to be checked before i allow the user to actually save the data?
It would be also nice if i could somehow do it to all the controls at once.
Thank u.