blob: c82d504e3f59df229547e1cb2f1321015c0ecd6d [file] [log] [blame]
{ "type": "class",
"qname": "mx.validators.DateValidator",
"baseClassname": "mx.validators.Validator"
,
"description": "The DateValidator class validates that a String, Date, or Object contains a proper date and matches a specified format. Users can enter a single digit or two digits for month, day, and year. By default, the validator ensures the following formats: <ul> <li>The month is between 1 and 12 (or 0-11 for <code>Date</code> objects)</li> <li>The day is between 1 and 31</li> <li>The year is a number</li> </ul> <p>You can specify the date in the DateValidator class in two ways:</p> <ul> <li>Single String containing the date - Use the <code>source</code> and <code>property</code> properties to specify the String. The String can contain digits and the formatting characters specified by the <code>allowedFormatChars</code> property, which include the &quot;/&#92;-. &quot; characters. By default, the input format of the date in a String field is &quot;MM/DD/YYYY&quot; where &quot;MM&quot; is the month, &quot;DD&quot; is the day, and &quot;YYYY&quot; is the year. You can use the <code>inputFormat</code> property to specify a different format.</li> <li><code>Date</code> object.</li> <li>Object or multiple fields containing the day, month, and year. Use all of the following properties to specify the day, month, and year inputs: <code>daySource</code>, <code>dayProperty</code>, <code>monthSource</code>, <code>monthProperty</code>, <code>yearSource</code>, and <code>yearProperty</code>.</li> </ul> <p>The <code>&lt;mx:DateValidator&gt;</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:DateValidator\\n allowedFormatChars=&quot;/&#92;-. &quot;\\n dayListener=&quot;<i>Object specified by daySource</i>&quot;\\n dayProperty=&quot;<i>No default</i>&quot;\\n daySource=&quot;<i>No default</i>&quot;\\n formatError= &quot;Configuration error: Incorrect formatting string.&quot;\\n includeFormatInError=&quot;true|false&quot;\\n inputFormat=&quot;MM/DD/YYYY&quot;\\n invalidCharError=&quot;The date contains invalid characters.&quot;\\n monthListener=&quot;<i>Object specified by monthSource</i>&quot;\\n monthProperty=&quot;<i>No default</i>&quot;\\n monthSource=&quot;<i>No default</i>&quot;\\n validateAsString=&quot;true|false&quot;\\n wrongDayError=&quot;Enter a valid day for the month.&quot;\\n wrongLengthError=&quot;Type the date in the format <i>inputFormat</i>.&quot;\\n wrongMonthError=&quot;Enter a month between 1 and 12.&quot;\\n wrongYearError=&quot;Enter a year between 0 and 9999.&quot;\\n yearListener=&quot;<i>Object specified by yearSource</i>&quot;\\n yearProperty=&quot;<i>No default</i>&quot;\\n yearSource=&quot;<i>No default</i>&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/DateValidatorExample.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": "mx.validators.DateValidator",
"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": "String",
"qname": "inputFormat",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The date format to validate the value against. &quot;MM&quot; is the month, &quot;DD&quot; is the day, and &quot;YYYY&quot; is the year. This String is case-sensitive.",
"tags": [
{ "tagName": "default",
"values": [""MM/DD/YYYY""]},
{ "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": "formatError",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Error message when the <code>inputFormat</code> property is not in the correct format.",
"tags": [
{ "tagName": "default",
"values": [""Configuration error: Incorrect formatting string.""]},
{ "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": "requiredFieldError",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Error message when a value is missing and the <code>required</code> property is <code>true</code>.",
"tags": [
{ "tagName": "default",
"values": [""This field is required.""]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}