如何为文本框实现绑定验证?
<TextBox Name="textBox1" Width="50" FontSize="15"
Validation.ErrorTemplate="{StaticResource validationTemplate}"
Style="{StaticResource textBoxInError}"
Grid.Row="1" Grid.Column="1" Margin="2">
<TextBox.Text>
<Binding Path="Age" Source="{StaticResource ods}"
UpdateSourceTrigger="PropertyChanged" >
<Binding.ValidationRules>
// *** What should I write here? ***
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
我应该在验证规则中写什么?