Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Compare the 2 passwords, MVVM Entity Framework.

$
0
0

Hey Andy, how can I cause a validation error if the re-entered password doesn't match the first password? 

Within my User Model in my database I don't have a property for the re-entered password, so I can't Bind to it in my ViewModel. 

<WrapPanel><TextBox Tag="Password..."
                Style="{StaticResource DefaultPasswordBox}"
                Text="{Binding EditVM.TheEntity.Hash,
        UpdateSourceTrigger=PropertyChanged,
        NotifyOnSourceUpdated=True,
        NotifyOnValidationError=True,
        Mode=TwoWay}" /><TextBox Tag="Re-enter Password..."
                Name="HashCheck"
                Style="{StaticResource DefaultPasswordBox}" /></WrapPanel>
The first TextBox works fine and is validated based on it's length at the moment, but not too sure how I could cause a ValidationError on my EditVM Entity so that I can check for errors before submitting the information and saving it. 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>