Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.form.field.VTypes.js
1 Ext.data.JsonP.Ext_form_field_VTypes({
2   "tagname": "class",
3   "name": "Ext.form.field.VTypes",
4   "doc": "<p>This is a singleton object which contains a set of commonly used field validation functions.\nThe validations provided are basic and intended to be easily customizable and extended.</p>\n\n\n<p>To add custom VTypes specify the <code><a href=\"#/api/Ext.form.field.Text-cfg-vtype\" rel=\"Ext.form.field.Text-cfg-vtype\" class=\"docClass\">vtype</a></code> validation\ntest function, and optionally specify any corresponding error text to display and any keystroke\nfiltering mask to apply. For example:</p>\n\n\n<pre><code>// custom Vtype for vtype:'time'\nvar timeTest = /^([1-9]|1[0-9]):([0-5][0-9])(\\s[a|p]m)$/i;\nExt.apply(Ext.form.field.VTypes, {\n    //  vtype validation function\n    time: function(val, field) {\n        return timeTest.test(val);\n    },\n    // vtype Text property: The error text to display when the validation function returns false\n    timeText: 'Not a valid time.  Must be in the format \"12:34 PM\".',\n    // vtype Mask property: The keystroke filter mask\n    timeMask: /[\\d\\s:amp]/i\n});\n</code></pre>\n\n\n<p>Another example:</p>\n\n<pre><code>// custom Vtype for vtype:'IPAddress'\nExt.apply(Ext.form.field.VTypes, {\n    IPAddress:  function(v) {\n        return /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/.test(v);\n    },\n    IPAddressText: 'Must be a numeric IP address',\n    IPAddressMask: /[\\d\\.]/i\n});\n</code></pre>\n\n",
5   "extends": null,
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": null,
15   "singleton": true,
16   "private": false,
17   "cfg": [
18
19   ],
20   "method": [
21     {
22       "tagname": "method",
23       "name": "alpha",
24       "member": "Ext.form.field.VTypes",
25       "doc": "<p>The function used to validate alpha values</p>\n",
26       "params": [
27         {
28           "type": "String",
29           "name": "value",
30           "doc": "<p>The value</p>\n",
31           "optional": false
32         }
33       ],
34       "return": {
35         "type": "Boolean",
36         "doc": "<p>true if the RegExp test passed, and false if not.</p>\n"
37       },
38       "private": false,
39       "static": false,
40       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
41       "linenr": 90,
42       "html_filename": "VTypes.html",
43       "href": "VTypes.html#Ext-form-field-VTypes-method-alpha",
44       "shortDoc": "<p>The function used to validate alpha values</p>\n"
45     },
46     {
47       "tagname": "method",
48       "name": "alphanum",
49       "member": "Ext.form.field.VTypes",
50       "doc": "<p>The function used to validate alphanumeric values</p>\n",
51       "params": [
52         {
53           "type": "String",
54           "name": "value",
55           "doc": "<p>The value</p>\n",
56           "optional": false
57         }
58       ],
59       "return": {
60         "type": "Boolean",
61         "doc": "<p>true if the RegExp test passed, and false if not.</p>\n"
62       },
63       "private": false,
64       "static": false,
65       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
66       "linenr": 111,
67       "html_filename": "VTypes.html",
68       "href": "VTypes.html#Ext-form-field-VTypes-method-alphanum",
69       "shortDoc": "<p>The function used to validate alphanumeric values</p>\n"
70     },
71     {
72       "tagname": "method",
73       "name": "email",
74       "member": "Ext.form.field.VTypes",
75       "doc": "<p>The function used to validate email addresses.  Note that this is a very basic validation -- complete\nvalidation per the email RFC specifications is very complex and beyond the scope of this class, although\nthis function can be overridden if a more comprehensive validation scheme is desired.  See the validation\nsection of the <a href=\"http://en.wikipedia.org/wiki/E-mail_address\">Wikipedia article on email addresses</a>\nfor additional information.  This implementation is intended to validate the following emails:<tt>\n'barney@example.de', 'barney.rubble@example.com', 'barney-rubble@example.coop', 'barney+rubble@example.com'\n</tt>.</p>\n",
76       "params": [
77         {
78           "type": "String",
79           "name": "value",
80           "doc": "<p>The email address</p>\n",
81           "optional": false
82         }
83       ],
84       "return": {
85         "type": "Boolean",
86         "doc": "<p>true if the RegExp test passed, and false if not.</p>\n"
87       },
88       "private": false,
89       "static": false,
90       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
91       "linenr": 47,
92       "html_filename": "VTypes.html",
93       "href": "VTypes.html#Ext-form-field-VTypes-method-email",
94       "shortDoc": "The function used to validate email addresses.  Note that this is a very basic validation -- complete\nvalidation per ..."
95     },
96     {
97       "tagname": "method",
98       "name": "url",
99       "member": "Ext.form.field.VTypes",
100       "doc": "<p>The function used to validate URLs</p>\n",
101       "params": [
102         {
103           "type": "String",
104           "name": "value",
105           "doc": "<p>The URL</p>\n",
106           "optional": false
107         }
108       ],
109       "return": {
110         "type": "Boolean",
111         "doc": "<p>true if the RegExp test passed, and false if not.</p>\n"
112       },
113       "private": false,
114       "static": false,
115       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
116       "linenr": 75,
117       "html_filename": "VTypes.html",
118       "href": "VTypes.html#Ext-form-field-VTypes-method-url",
119       "shortDoc": "<p>The function used to validate URLs</p>\n"
120     }
121   ],
122   "property": [
123     {
124       "tagname": "property",
125       "name": "alphaMask",
126       "member": "Ext.form.field.VTypes",
127       "type": "RegExp",
128       "doc": "<p>The keystroke filter mask to be applied on alpha input.  Defaults to:\n<tt>/[a-z_]/i</tt></p>\n",
129       "private": false,
130       "static": false,
131       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
132       "linenr": 104,
133       "html_filename": "VTypes.html",
134       "href": "VTypes.html#Ext-form-field-VTypes-property-alphaMask"
135     },
136     {
137       "tagname": "property",
138       "name": "alphaText",
139       "member": "Ext.form.field.VTypes",
140       "type": "String",
141       "doc": "<p>The error text to display when the alpha validation function returns false.  Defaults to:\n<tt>'This field should only contain letters and _'</tt></p>\n",
142       "private": false,
143       "static": false,
144       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
145       "linenr": 98,
146       "html_filename": "VTypes.html",
147       "href": "VTypes.html#Ext-form-field-VTypes-property-alphaText",
148       "shortDoc": "The error text to display when the alpha validation function returns false.  Defaults to:\n'This field should only con..."
149     },
150     {
151       "tagname": "property",
152       "name": "alphanumMask",
153       "member": "Ext.form.field.VTypes",
154       "type": "RegExp",
155       "doc": "<p>The keystroke filter mask to be applied on alphanumeric input.  Defaults to:\n<tt>/[a-z0-9_]/i</tt></p>\n",
156       "private": false,
157       "static": false,
158       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
159       "linenr": 125,
160       "html_filename": "VTypes.html",
161       "href": "VTypes.html#Ext-form-field-VTypes-property-alphanumMask"
162     },
163     {
164       "tagname": "property",
165       "name": "alphanumText",
166       "member": "Ext.form.field.VTypes",
167       "type": "String",
168       "doc": "<p>The error text to display when the alphanumeric validation function returns false.  Defaults to:\n<tt>'This field should only contain letters, numbers and _'</tt></p>\n",
169       "private": false,
170       "static": false,
171       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
172       "linenr": 119,
173       "html_filename": "VTypes.html",
174       "href": "VTypes.html#Ext-form-field-VTypes-property-alphanumText",
175       "shortDoc": "The error text to display when the alphanumeric validation function returns false.  Defaults to:\n'This field should o..."
176     },
177     {
178       "tagname": "property",
179       "name": "emailMask",
180       "member": "Ext.form.field.VTypes",
181       "type": "RegExp",
182       "doc": "<p>The keystroke filter mask to be applied on email input.  See the <a href=\"#/api/Ext.form.field.VTypes-method-email\" rel=\"Ext.form.field.VTypes-method-email\" class=\"docClass\">email</a> method for\ninformation about more complex email validation. Defaults to:\n<tt>/[a-z0-9_.-@]/i</tt></p>\n",
183       "private": false,
184       "static": false,
185       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
186       "linenr": 67,
187       "html_filename": "VTypes.html",
188       "href": "VTypes.html#Ext-form-field-VTypes-property-emailMask",
189       "shortDoc": "The keystroke filter mask to be applied on email input.  See the email method for\ninformation about more complex emai..."
190     },
191     {
192       "tagname": "property",
193       "name": "emailText",
194       "member": "Ext.form.field.VTypes",
195       "type": "String",
196       "doc": "<p>The error text to display when the email validation function returns false.  Defaults to:\n<tt>'This field should be an e-mail address in the format \"user@example.com\"'</tt></p>\n",
197       "private": false,
198       "static": false,
199       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
200       "linenr": 61,
201       "html_filename": "VTypes.html",
202       "href": "VTypes.html#Ext-form-field-VTypes-property-emailText",
203       "shortDoc": "The error text to display when the email validation function returns false.  Defaults to:\n'This field should be an e-..."
204     },
205     {
206       "tagname": "property",
207       "name": "urlText",
208       "member": "Ext.form.field.VTypes",
209       "type": "String",
210       "doc": "<p>The error text to display when the url validation function returns false.  Defaults to:\n<tt>'This field should be a URL in the format \"http:/'+'/www.example.com\"'</tt></p>\n",
211       "private": false,
212       "static": false,
213       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
214       "linenr": 83,
215       "html_filename": "VTypes.html",
216       "href": "VTypes.html#Ext-form-field-VTypes-property-urlText",
217       "shortDoc": "The error text to display when the url validation function returns false.  Defaults to:\n'This field should be a URL i..."
218     }
219   ],
220   "event": [
221
222   ],
223   "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/field/VTypes.js",
224   "linenr": 1,
225   "html_filename": "VTypes.html",
226   "href": "VTypes.html#Ext-form-field-VTypes",
227   "cssVar": [
228
229   ],
230   "cssMixin": [
231
232   ],
233   "component": false,
234   "superclasses": [
235
236   ],
237   "subclasses": [
238
239   ],
240   "mixedInto": [
241
242   ],
243   "allMixins": [
244
245   ]
246 });