Ext.form.field.Number change min/max Value doesn't reset maskRe

Ext.form.field.Number change min/max Value doesn't reset maskRe

Ext version tested:

Ext 4.1.0

Browser versions tested against:

Chrome v20 (Windows)

Description:

The maskRe for Number fields is only set on initComponent and is never checked again. There are public methods exposed to control the minValue and maxValue for the field but they don't re-evaluate the maskRe.

Steps to reproduce the problem:

Create a number field where minValue = 0 and maxValue = Number.Max_Value (Only positive numbers)

Notice that you CAN'T type in a negative sign. This is correct.

After it has been rendered, programatically set the minValue = -Number.Max_Value and the maxValue = -Number.Min_Value (Only negative numbers)

Notice that you still CAN'T type in a negative sign. This is incorrect.

The result that was expected:

You should be able to key in negative numbers

The result that occurs instead:

You can't enter the negative sign because of the maskRe assigned previously.