title: How does IDataErrorInfo interface provide validation values
body: <p>I want to fire more than one validation on the same element. I found code but I do not understand in which situation which validation fire. The xaml code is as follows:</p>
  
  <pre><code>&lt;ComboBox 
              x:Name="CreditedParty"
              Style="{StaticResource FormControlStyle}"
              Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2"
              ItemsSource="{Binding CreditedParties}"
              SelectedItem="{Binding Amount, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
              DisplayMemberPath="Name"/&gt;
          &lt;ContentPresenter 
              Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2"
              Content="{Binding ElementName=CreditedParty, Path=(Validation.Errors).CurrentItem}"/&gt;
  </code></pre>
  
  <p>the code for vtewmodel.cs file is as follows:</p>
  
  <pre><code>   public string Error
      {
          get { return (_debitNote as IDataErrorInfo).Error; }
      }
  
      public string this[string columnName]
      {
          get
          {
              string error = null;
  
              if (columnName == "Amount")
              {
                  decimal amount;
  
                  error = ValidateAmount(out amount);
                  if (!string.IsNullOrEmpty(error)) return error;
  
                  _debitNote.Amount = amount;
                  error = (_debitNote as IDataErrorInfo)["Amount"];
              }
              else if (columnName == "CreditedParty")
              {
                  error = ValidateCreditedParty();
                  if (!string.IsNullOrEmpty(error)) return error;
                  error = (_debitNote as IDataErrorInfo)["CreditedParty"];
              }
              else if (columnName == "DebitedParty")
              {
                  error = ValidateDebitedParty();
                  if (!string.IsNullOrEmpty(error)) return error;
                  error = (_debitNote as IDataErrorInfo)["DebitedParty"];
              }
              else
              {
                  error = (_debitNote as IDataErrorInfo)[columnName];
              }
  
              CommandManager.InvalidateRequerySuggested();
  
              return error;
          }
      }
  
      private string ValidateAmount(out decimal amount)
      {
          amount = -1;
          string error = null;
  
          if (string.IsNullOrEmpty(_amountString))
              error = Strings.JournalViewModel_Amount_Missing;
          else if (!decimal.TryParse(_amountString, out amount))
              error = Strings.JournalViewModel_Amount_NaN;
  
          return error;
      }
  
      private string ValidateCreditedParty()
      {
          string error = null;
  
          if (_debitNote.CreditedParty == _blankCreditedParty)
              error = Strings.JournalViewModel_CreditedParty_NotSpecified;
  
          return error;
      }
  
      private string ValidateDebitedParty()
      {
          string error = null;
  
          if (_debitNote.DebitedParty == _blankDebitedParty)
              error = Strings.JournalViewModel_DebitedParty_NotSpecified;
  
          return error;
      }
  
      #endregion
  </code></pre>
  
  <p>How does this code fire more than one validation? Can any one answer.</p>