diff options
author | mensonge | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/validate/ca.js | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | scuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz scuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.zip |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/validate/ca.js')
-rw-r--r-- | includes/js/dojox/validate/ca.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/includes/js/dojox/validate/ca.js b/includes/js/dojox/validate/ca.js deleted file mode 100644 index dbd3aa5..0000000 --- a/includes/js/dojox/validate/ca.js +++ /dev/null @@ -1,44 +0,0 @@ -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); -}; - -} |