commit extjs-2.2.1
[extjs.git] / docs / output / Ext.form.VTypes.html
1         <div class="body-wrap">
2         <div class="top-tools">
3             <a class="inner-link" href="#Ext.form.VTypes-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4             <a class="inner-link" href="#Ext.form.VTypes-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5             <a class="inner-link" href="#Ext.form.VTypes-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                         <a class="bookmark" href="../docs/?class=Ext.form.VTypes"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
7         </div>
8                 <h1>Class Ext.form.VTypes</h1>
9         <table cellspacing="0">
10             <tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr>
11             <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/VTypes.js" target="_blank">VTypes.js</a></td></tr>
12             <tr><td class="label">Class:</td><td class="hd-info">VTypes</td></tr>
13                                     <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
14                     </table>
15         <div class="description">
16             *
17 This is a singleton object which contains a set of commonly used field validation functions.
18 The validations provided are basic and intended to be easily customizable and extended. To add
19 your own custom VType:<pre><code>Ext.apply(Ext.form.VTypes, {
20     IPAddress:  <b>function</b>(v) {
21         <b>return</b> /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
22     },
23     IPAddressText: <em>'Must be a numeric IP address'</em>
24 });</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>        </div>
25         
26         <div class="hr"></div>
27                 <a id="Ext.form.VTypes-props"></a>
28         <h2>Public Properties</h2>
29                 <table cellspacing="0" class="member-table">
30             <tr>
31                 <th class="sig-header" colspan="2">Property</th>
32                 <th class="msource-header">Defined By</th>
33             </tr>
34                 <tr class="property-row">\r
35         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
36         <td class="sig">\r
37         <a id="Ext.form.VTypes-alphaMask"></a>\r
38             <b>alphaMask</b> : RegExp            <div class="mdesc">\r
39                             The keystroke filter mask to be applied on alpha input                        </div>\r
40         </td>\r
41         <td class="msource">VTypes</td>\r
42     </tr>\r
43         <tr class="property-row alt">\r
44         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
45         <td class="sig">\r
46         <a id="Ext.form.VTypes-alphaText"></a>\r
47             <b>alphaText</b> : String            <div class="mdesc">\r
48                             The error text to display when the alpha validation function returns false                        </div>\r
49         </td>\r
50         <td class="msource">VTypes</td>\r
51     </tr>\r
52         <tr class="property-row">\r
53         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
54         <td class="sig">\r
55         <a id="Ext.form.VTypes-alphanumMask"></a>\r
56             <b>alphanumMask</b> : RegExp            <div class="mdesc">\r
57                             The keystroke filter mask to be applied on alphanumeric input                        </div>\r
58         </td>\r
59         <td class="msource">VTypes</td>\r
60     </tr>\r
61         <tr class="property-row alt">\r
62         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
63         <td class="sig">\r
64         <a id="Ext.form.VTypes-alphanumText"></a>\r
65             <b>alphanumText</b> : String            <div class="mdesc">\r
66                             The error text to display when the alphanumeric validation function returns false                        </div>\r
67         </td>\r
68         <td class="msource">VTypes</td>\r
69     </tr>\r
70         <tr class="property-row expandable">\r
71         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
72         <td class="sig">\r
73         <a id="Ext.form.VTypes-emailMask"></a>\r
74             <b>emailMask</b> : RegExp            <div class="mdesc">\r
75                         <div class="short">The keystroke filter mask to be applied on email input.  See the email method for 
76 information about more complex ema...</div>\r
77             <div class="long">\r
78                 The keystroke filter mask to be applied on email input.  See the <a ext:cls="Ext.form.VTypes" ext:member="email" href="output/Ext.form.VTypes.html#email">email</a> method for 
79 information about more complex email validation.            </div>\r
80                         </div>\r
81         </td>\r
82         <td class="msource">VTypes</td>\r
83     </tr>\r
84         <tr class="property-row alt">\r
85         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
86         <td class="sig">\r
87         <a id="Ext.form.VTypes-emailText"></a>\r
88             <b>emailText</b> : String            <div class="mdesc">\r
89                             The error text to display when the email validation function returns false                        </div>\r
90         </td>\r
91         <td class="msource">VTypes</td>\r
92     </tr>\r
93         <tr class="property-row">\r
94         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
95         <td class="sig">\r
96         <a id="Ext.form.VTypes-urlText"></a>\r
97             <b>urlText</b> : String            <div class="mdesc">\r
98                             The error text to display when the url validation function returns false                        </div>\r
99         </td>\r
100         <td class="msource">VTypes</td>\r
101     </tr>\r
102             </table>
103                 <a id="Ext.form.VTypes-methods"></a>
104         <h2>Public Methods</h2>
105                 <table cellspacing="0" class="member-table">
106             <tr>
107                 <th class="sig-header" colspan="2">Method</th>
108                 <th class="msource-header">Defined By</th>
109             </tr>
110                 <tr class="method-row expandable">\r
111         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
112         <td class="sig">\r
113         <a id="Ext.form.VTypes-alpha"></a>\r
114             <b>alpha</b>(&nbsp;<code>String value</code>&nbsp;) : void            <div class="mdesc">\r
115                         <div class="short">The function used to validate alpha values</div>\r
116             <div class="long">\r
117                 The function used to validate alpha values    <div class="mdetail-params">\r
118         <strong>Parameters:</strong>\r
119         <ul><li><code>value</code> : String<div class="sub-desc">The value</div></li>        </ul>\r
120         <strong>Returns:</strong>\r
121         <ul>\r
122             <li><code>void</code></li>\r
123         </ul>\r
124     </div>\r
125                 </div>\r
126                         </div>\r
127         </td>\r
128         <td class="msource">VTypes</td>\r
129     </tr>\r
130         <tr class="method-row alt expandable">\r
131         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
132         <td class="sig">\r
133         <a id="Ext.form.VTypes-alphanum"></a>\r
134             <b>alphanum</b>(&nbsp;<code>String value</code>&nbsp;) : void            <div class="mdesc">\r
135                         <div class="short">The function used to validate alphanumeric values</div>\r
136             <div class="long">\r
137                 The function used to validate alphanumeric values    <div class="mdetail-params">\r
138         <strong>Parameters:</strong>\r
139         <ul><li><code>value</code> : String<div class="sub-desc">The value</div></li>        </ul>\r
140         <strong>Returns:</strong>\r
141         <ul>\r
142             <li><code>void</code></li>\r
143         </ul>\r
144     </div>\r
145                 </div>\r
146                         </div>\r
147         </td>\r
148         <td class="msource">VTypes</td>\r
149     </tr>\r
150         <tr class="method-row expandable">\r
151         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
152         <td class="sig">\r
153         <a id="Ext.form.VTypes-email"></a>\r
154             <b>email</b>(&nbsp;<code>String value</code>&nbsp;) : void            <div class="mdesc">\r
155                         <div class="short">The function used to validate email addresses.  Note that this is a very basic validation -- complete
156 validation per ...</div>\r
157             <div class="long">\r
158                 The function used to validate email addresses.  Note that this is a very basic validation -- complete
159 validation per the email RFC specifications is very complex and beyond the scope of this class, although
160 this function can be overridden if a more comprehensive validation scheme is desired.  See the validation
161 section of the <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a> 
162 for additional information.    <div class="mdetail-params">\r
163         <strong>Parameters:</strong>\r
164         <ul><li><code>value</code> : String<div class="sub-desc">The email address</div></li>        </ul>\r
165         <strong>Returns:</strong>\r
166         <ul>\r
167             <li><code>void</code></li>\r
168         </ul>\r
169     </div>\r
170                 </div>\r
171                         </div>\r
172         </td>\r
173         <td class="msource">VTypes</td>\r
174     </tr>\r
175         <tr class="method-row alt expandable">\r
176         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
177         <td class="sig">\r
178         <a id="Ext.form.VTypes-url"></a>\r
179             <b>url</b>(&nbsp;<code>String value</code>&nbsp;) : void            <div class="mdesc">\r
180                         <div class="short">The function used to validate URLs</div>\r
181             <div class="long">\r
182                 The function used to validate URLs    <div class="mdetail-params">\r
183         <strong>Parameters:</strong>\r
184         <ul><li><code>value</code> : String<div class="sub-desc">The URL</div></li>        </ul>\r
185         <strong>Returns:</strong>\r
186         <ul>\r
187             <li><code>void</code></li>\r
188         </ul>\r
189     </div>\r
190                 </div>\r
191                         </div>\r
192         </td>\r
193         <td class="msource">VTypes</td>\r
194     </tr>\r
195             </table>
196                 <a id="Ext.form.VTypes-events"></a>
197         <h2>Public Events</h2>
198         <div class="no-members">This class has no public events.</div>
199         </div>