{ "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 "/\-. " characters. By default, the input format of the date in a String field is "MM/DD/YYYY" where "MM" is the month, "DD" is the day, and "YYYY" 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><mx:DateValidator></code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n <mx:DateValidator\\n allowedFormatChars="/\-. "\\n dayListener="<i>Object specified by daySource</i>"\\n dayProperty="<i>No default</i>"\\n daySource="<i>No default</i>"\\n formatError= "Configuration error: Incorrect formatting string."\\n includeFormatInError="true|false"\\n inputFormat="MM/DD/YYYY"\\n invalidCharError="The date contains invalid characters."\\n monthListener="<i>Object specified by monthSource</i>"\\n monthProperty="<i>No default</i>"\\n monthSource="<i>No default</i>"\\n validateAsString="true|false"\\n wrongDayError="Enter a valid day for the month."\\n wrongLengthError="Type the date in the format <i>inputFormat</i>."\\n wrongMonthError="Enter a month between 1 and 12."\\n wrongYearError="Enter a year between 0 and 9999."\\n yearListener="<i>Object specified by yearSource</i>"\\n yearProperty="<i>No default</i>"\\n yearSource="<i>No default</i>"\\n />\\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. "MM" is the month, "DD" is the day, and "YYYY" 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"]} ]}] | |
} |