blob: 9927c7f8dcbea446e4e666810a66d53dbc24019e [file] [log] [blame]
{ "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., &quot;12,345.67&quot;) and you can customize the <code>thousandsSeparator</code> and <code>decimalSeparator</code> properties for internationalization. <p>The <code>&lt;mx:NumberValidator&gt;</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:NumberValidator\\n allowNegative=&quot;true|false&quot;\\n decimalPointCountError=&quot;The decimal separator can only occur once.&quot;\\n decimalSeparator=&quot;.&quot;\\n domain=&quot;real|int&quot;\\n exceedsMaxError=&quot;The number entered is too large.&quot;\\n integerError=&quot;The number must be an integer.&quot;\\n invalidCharError=&quot;The input contains invalid characters.&quot;\\n invalidFormatCharsError=&quot;One of the formatting parameters is invalid.&quot;\\n lowerThanMinError=&quot;The amount entered is too small.&quot;\\n maxValue=&quot;NaN&quot;\\n minValue=&quot;NaN&quot;\\n negativeError=&quot;The amount may not be negative.&quot;\\n precision=&quot;-1&quot;\\n precisionError=&quot;The amount entered has too many digits beyond the decimal point.&quot;\\n separationError=&quot;The thousands separator must be followed by three digits.&quot;\\n thousandsSeparator=&quot;,&quot;\\n /&gt;\\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 &quot;number&quot;. 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>&quot;real&quot;</code> and <code>&quot;int&quot;</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>&quot;int&quot;</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"}]}
]
}