Use CurrencyValidator to validate money values : CurrencyValidator « Data Model « Flex






Use CurrencyValidator to validate money values

Use CurrencyValidator to validate money values
  

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:CurrencyValidator source="{income}" 
                          property="text"
                          allowNegative="false" 
                          negativeError="You pay your employer?"
                          precision="2" 
                          precisionError="Just 2 decimals please."
                          trigger="{submitButton}" 
                          triggerEvent="click" />
    <mx:Text text="Money value:" />
    <mx:TextInput id="income" />
    <mx:Button label="Submit" id="submitButton" />
</mx:Application>

   
    
  








Related examples in the same category

1.Using the CurrencyValidator to validate US currencyUsing the CurrencyValidator to validate US currency
2.Using the CurrencyValidator to validate European-formatted priceUsing the CurrencyValidator to validate European-formatted price
3.Using CurrencyValidator class to validate a currency value entered in U.S. dollars and in EurosUsing CurrencyValidator class to validate a currency value entered in U.S. dollars and in Euros
4.Use NumberValidator to validate and CurrencyFormatter to formatUse NumberValidator to validate and CurrencyFormatter to format
5.Currency formatter cell rendererCurrency formatter cell renderer
6.CurrencyFormatter precisionCurrencyFormatter precision
7.CurrencyFormatter decimalSeparatorToCurrencyFormatter decimalSeparatorTo
8.CurrencyFormatter thousandsSeparatorToCurrencyFormatter thousandsSeparatorTo
9.CurrencyFormatter useThousandsSeparatorCurrencyFormatter useThousandsSeparator
10.CurrencyFormatter useNegativeSignCurrencyFormatter useNegativeSign
11.Example of Currency FormatterExample of Currency Formatter
12.Use CurrencyFormatter and NumberFormatter to format label for ChartUse CurrencyFormatter and NumberFormatter to format label for Chart
13.Using the CurrencyFormatter classUsing the CurrencyFormatter class