So I try to setup my custom number validation on WPF:

```
public class NumberValidation : ValidationRule {
    private int _min;
    private int _max;

    public NumberValidation() {
    }

    public int Min {
        get { return _min; }
        set { _min = value; }
    }

    public int Max {
        get { return _max; }
        set { _max = value; }
    }

    public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
        int age = 0;

        try {
            if (((string)value).Length > 0)
                age = Int32.Parse((String)value);
        } catch (Exception e) {
            return new ValidationResult(false, "Illegal characters or " + e.Message);
        }

        if ((age < Min) || (age > Max)) {
            return new ValidationResult(false,
              "Please enter an age in the range: " + Min + " - " + Max + ".");
        } else {
            return new ValidationResult(true, null);
        }
    }
}

```

And then try to implement it in the XML:

```
<Window x:Class="MiningControl.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" 
        DataContext="{Binding}">
    <Grid>
        <TextBox Height="23" HorizontalAlignment="Right" Margin="0,74,161,0" Name="txb_idleTime" VerticalAlignment="Top" Width="120"
            >
            <TextBox.Text>
                <Binding Path="MinIdleTime" UpdateSourceTrigger="PropertyChanged" >
                    <Binding.ValidationRules>
                        <NumberValidation Min="10" Max="3600" />
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>
        <Label Content="Minimum Idle Time (min):" Height="28" HorizontalAlignment="Left" Margin="23,72,0,0" Name="label1" VerticalAlignment="Top" Width="202" HorizontalContentAlignment="Right" />
    </Grid>
</Window>

```

But it doesn't work it keep saying "NumberValidation" does not exist in the XML namespace, what am I doing wrong?