Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F946232
ca.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
ca.js
View Options
if
(
!
dojo
.
_hasResource
[
"dojox.validate.ca"
]){
//_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo
.
_hasResource
[
"dojox.validate.ca"
]
=
true
;
dojo
.
provide
(
"dojox.validate.ca"
);
dojo
.
require
(
"dojox.validate._base"
);
dojox
.
validate
.
ca
.
isPhoneNumber
=
function
(
/* String */
value
)
{
// summary: Validates 10 Canadian digit phone number for several common formats
// returns: Boolean
return
dojox
.
validate
.
us
.
isPhoneNumber
(
value
);
// same as US
};
dojox
.
validate
.
ca
.
isProvince
=
function
(
/* String[2] */
value
)
{
// summary: Validates Canadian province abbreviations (2 chars)
// returns: Boolean
var
re
=
new
RegExp
(
"^"
+
dojox
.
regexp
.
ca
.
province
()
+
"$"
,
"i"
);
return
re
.
test
(
value
);
};
dojox
.
validate
.
ca
.
isSocialInsuranceNumber
=
function
(
/* String */
value
)
{
// summary: Validates Canadian 9 digit social insurance number for several common formats
// This routine only pattern matches and does not use the Luhn Algorithm to validate number.
// returns: Boolean
var
flags
=
{
format
:
[
"###-###-###"
,
"### ### ###"
,
"#########"
]
};
return
dojox
.
validate
.
isNumberFormat
(
value
,
flags
);
};
dojox
.
validate
.
ca
.
isPostalCode
=
function
(
value
)
{
// summary: Validates Canadian 6 digit postal code:
// Canadian postal codes are in the format ANA NAN,
// where A is a letter and N is a digit, with a space
// separating the third and fourth characters.
// returns: Boolean
var
re
=
new
RegExp
(
"^"
+
dojox
.
regexp
.
ca
.
postalCode
()
+
"$"
,
"i"
);
return
re
.
test
(
value
);
};
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 05:44 (3 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25201
Default Alt Text
ca.js (1 KB)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment