blob: 6ea99573efaf154b1e564404a2ae22814639e5b3 [file] [log] [blame]
{ "type": "class",
"qname": "mx.formatters.ZipCodeFormatter",
"baseClassname": "mx.formatters.Formatter"
,
"description": "The ZipCodeFormatter class formats a valid number into one of the following formats, based on a user-supplied <code>formatString</code> property. <ul> <li>#####-####</li> <li>##### ####</li> <li>#####</li> <li>### ### (Canadian)</li> </ul> <p>A six-digit number must be supplied for a six-digit mask. If you use a five-digit or a nine-digit mask, you can use either a five-digit or a nine-digit number for formatting.</p> <p>If an error occurs, an empty String is returned and a String that describes the error is saved to the <code>error</code> property. The <code>error</code> property can have one of the following values:</p> <ul> <li><code>&quot;Invalid value&quot;</code> means an invalid numeric value is passed to the <code>format()</code> method. The value should be a valid number in the form of a Number or a String, except for Canadian postal code, which allows alphanumeric values, or the number of digits does not match the allowed digits from the <code>formatString</code> property.</li> <li> <code>&quot;Invalid format&quot;</code> means any of the characters in the <code>formatString</code> property do not match the allowed characters specified in the <code>validFormatChars</code> property, or the number of numeric placeholders does not equal 9, 5, or 6.</li> </ul> <p>The <code>&lt;mx:ZipCodeFormatter&gt;</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:ZipCodeFormatter\\n formatString=&quot;#####|#####-####|### ###&quot;\\n />\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/ZipCodeFormatterExample.mxml"]},
{ "tagName": "see",
"values": ["mx.formatters.SwitchSymbolFormatter"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.formatters.ZipCodeFormatter",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "formatString",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The mask pattern. Possible values are <code>&quot;#####-####&quot;</code>, <code>&quot;##### ####&quot;</code>, <code>&quot;#####&quot;</code>, <code>&quot;###-###&quot;</code> and <code>&quot;### ###&quot;</code>.",
"tags": [
{ "tagName": "default",
"values": [""#####""]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "format",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Formats the String by using the specified format. If the value cannot be formatted, return an empty String and write a description of the error to the <code>error</code> property. of the error condition is written to the <code>error</code> property.",
"tags": [
{ "tagName": "param",
"values": ["value Value to format."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["Formatted String. Empty if an error occurs. A description"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "String",
"params": [{ "name": "value", "type": "Object"}]}
]
}