Hi,

I am trying to validate the currency in a text input. The currency 
could be negative, must be not more than two decimal place. This is 
the code that I have.

<mx:CurrencyValidator id="valueValidator" currencySymbol="$" 
precision="2" 
allowNegative="true" source="{value}" property="text" />

<mx:TextInput id="value" paddingLeft="0" paddingRight="0" 
change="{testVO.value = Number(value.text)}" text="{testVO.value}"/>

The problem that I am having is when the user types something that it 
cannot accept, it put's a value 'NaN', and I can't change this value 
or delete it. So this is like crashing the screen and the user can't 
change anything. How can I fix this? By the way the 'testVO.value' is 
of type 'Number'. Thanks. 

Reply via email to