title: Implement Validation for WPF TextBoxes
body: <p>I have 3 TextBoxes (<code>Id1</code>,<code>Name</code> and <code>Salary</code>). <code>Id</code> and <code>Salary</code> should contain integers and <code>Name</code> should only contain characters. I need validations for my TextBox, it should show errors as I enter wrong characters or integers. Also can this be done only in Xaml without codebehind? Please help me with the required code</p>
  
  <p>This is Xaml code:</p>
  
  <pre><code>&lt;TextBox Name="tb1" HorizontalAlignment="Left" Height="20" Margin="60,10,0,0" TextWrapping="NoWrap" Text="{Binding SelectedItem.Id,ElementName=dgsample}" VerticalAlignment="Top" Width="100" /&gt;
  &lt;TextBox Name="tb2" HorizontalAlignment="Left" Height="20" Margin="60,60,0,0" TextWrapping="NoWrap" Text="{Binding SelectedItem.Name, ElementName=dgsample}" VerticalAlignment="Top" Width="100"/&gt;
  &lt;TextBox Name="tb3" HorizontalAlignment="Left" Height="20" Margin="60,110,0,0" TextWrapping="NoWrap" Text="{Binding SelectedItem.Salary, ElementName=dgsample}" VerticalAlignment="Top" Width="100"/&gt;
  </code></pre>