I have a text input area defined like this:

    <TextBox>
        <TextBox.Text>
            <Binding Path="MyProperty">
                <Binding.ValidationRules>
                    <valid:MyValidator/>
                </Binding.ValidationRules>
            </Binding>
        </TextBox.Text>
    </TextBox>

My problem is that, depending on another setting, what is supposed to be inserted here varies. And thus, the validation behavior of the input data should change.

How can I in the code behind change the active validation rule for a certain textbox?

Edit
Report