root / trunk / web / dojo / dojox / validate / ca.js
History | View | Annotate | Download (847 Bytes)
1 |
/*
|
---|---|
2 |
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
3 |
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4 |
see: http://dojotoolkit.org/license for details
|
5 |
*/
|
6 |
|
7 |
|
8 |
if(!dojo._hasResource["dojox.validate.ca"]){ |
9 |
dojo._hasResource["dojox.validate.ca"]=true; |
10 |
dojo.provide("dojox.validate.ca");
|
11 |
dojo.require("dojox.validate._base");
|
12 |
dojo.mixin(dojox.validate.ca,{isPhoneNumber:function(_1){ |
13 |
return dojox.validate.us.isPhoneNumber(_1);
|
14 |
},isProvince:function(_2){ |
15 |
var re=new RegExp("^"+dojox.validate.regexp.ca.province()+"$","i"); |
16 |
return re.test(_2);
|
17 |
},isSocialInsuranceNumber:function(_3){ |
18 |
var _4={format:["###-###-###","### ### ###","#########"]}; |
19 |
return dojox.validate.isNumberFormat(_3,_4);
|
20 |
},isPostalCode:function(_5){ |
21 |
var re=new RegExp("^"+dojox.validate.regexp.ca.postalCode()+"$","i"); |
22 |
return re.test(_5);
|
23 |
}}); |
24 |
} |