{ "type": "class", | |
"qname": "mx.validators.NumberValidator", | |
"baseClassname": "mx.validators.Validator" | |
, | |
"description": "The NumberValidator class ensures that a String represents a valid number. It can ensure that the input falls within a given range (specified by <code>minValue</code> and <code>maxValue</code>), is an integer (specified by <code>domain</code>), is non-negative (specified by <code>allowNegative</code>), and does not exceed the specified <code>precision</code>. The validator correctly validates formatted numbers (e.g., "12,345.67") and you can customize the <code>thousandsSeparator</code> and <code>decimalSeparator</code> properties for internationalization. <p>The <code><mx:NumberValidator></code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n <mx:NumberValidator\\n allowNegative="true|false"\\n decimalPointCountError="The decimal separator can only occur once."\\n decimalSeparator="."\\n domain="real|int"\\n exceedsMaxError="The number entered is too large."\\n integerError="The number must be an integer."\\n invalidCharError="The input contains invalid characters."\\n invalidFormatCharsError="One of the formatting parameters is invalid."\\n lowerThanMinError="The amount entered is too small."\\n maxValue="NaN"\\n minValue="NaN"\\n negativeError="The amount may not be negative."\\n precision="-1"\\n precisionError="The amount entered has too many digits beyond the decimal point."\\n separationError="The thousands separator must be followed by three digits."\\n thousandsSeparator=","\\n />\\n </pre>", | |
"tags": [ | |
{ "tagName": "includeExample", | |
"values": ["examples/NumberValidatorExample.mxml"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "mxml", | |
"values": []}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "validateNumber", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Convenience method for calling a validator from within a custom validation function. Each of the standard Flex validators has a similar convenience method. specified in the <code>value</code> parameter. For example, if the <code>value</code> parameter specifies value.number, the <code>baseField</code> value is "number". object for each field examined by the validator.", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["mx.validators.ValidationResult"]}, | |
{ "tagName": "param", | |
"values": ["validator The NumberValidator instance.", "value A field to validate.", "baseField Text representation of the subfield"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["An Array of ValidationResult objects, with one ValidationResult"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Array", | |
"params": [{ "name": "validator", "type": "mx.validators.NumberValidator"}, | |
{ "name": "value", "type": "Object"}, | |
{ "name": "baseField", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "mx.validators.NumberValidator", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": []} | |
, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "allowNegative", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Specifies whether negative numbers are permitted. Valid values are <code>true</code> or <code>false</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["true"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "decimalSeparator", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The character used to separate the whole from the fractional part of the number. Cannot be a digit and must be distinct from the <code>thousandsSeparator</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["".""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "domain", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Type of number to be validated. Permitted values are <code>"real"</code> and <code>"int"</code>. <p>In ActionScript, you can use the following constants to set this property: <code>NumberValidatorDomainType.REAL</code> or <code>NumberValidatorDomainType.INT</code>.</p>", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""real""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "integerError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the number must be an integer, as defined by the <code>domain</code> property.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The number must be an integer.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "maxValue", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Maximum value for a valid number. A value of NaN means there is no maximum.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["NaN"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "minValue", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Minimum value for a valid number. A value of NaN means there is no minimum.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["NaN"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "precision", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The maximum number of digits allowed to follow the decimal point. Can be any nonnegative integer. Note: Setting to <code>0</code> has the same effect as setting <code>domain</code> to <code>"int"</code>. A value of -1 means it is ignored.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["-1"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "thousandsSeparator", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The character used to separate thousands in the whole part of the number. Cannot be a digit and must be distinct from the <code>decimalSeparator</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["",""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "decimalPointCountError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the decimal separator character occurs more than once.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The decimal separator can occur only once.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "exceedsMaxError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the value exceeds the <code>maxValue</code> property.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The number entered is too large.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "invalidCharError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the value contains invalid characters.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["The input contains invalid characters.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "invalidFormatCharsError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the value contains invalid format characters, which means that it contains a digit or minus sign (-) as a separator character, or it contains two or more consecutive separator characters.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""One of the formatting parameters is invalid.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "lowerThanMinError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the value is less than <code>minValue</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The amount entered is too small.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "negativeError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the value is negative and the <code>allowNegative</code> property is <code>false</code>.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The amount may not be negative.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "precisionError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the value has a precision that exceeds the value defined by the precision property.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The amount entered has too many digits beyond the decimal point.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "separationError", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Error message when the thousands separator is in the wrong location.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""The thousands separator must be followed by three digits.""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "method", | |
"qname": "doValidation", | |
"namespace": "protected", | |
"bindable": [], | |
"details": ["override"], | |
"deprecated": {}, | |
"description": "Override of the base class <code>doValidation()</code> method to validate a number. <p>You do not call this method directly; Flex calls it as part of performing a validation. If you create a custom Validator class, you must implement this method. </p> object for each field examined by the validator.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["value Object to validate."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["An Array of ValidationResult objects, with one ValidationResult"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "Array", | |
"params": [{ "name": "value", "type": "Object"}]} | |
] | |
} |