1234567891011121314151617181920212223242526272829 |
- define( function() {
- "use strict";
- function PageModule()
- {
- };
- function myPostalCodeValidator( re, aValues )
- {
- var iLength = aValues.length;
- for ( var i = 0; i < iLength; i++ )
- {
- var s = aValues[i].use;
- if ( !s || !s.match( re ) )
- {
- return false;
- }
- }
- return iLength > 0;
- }
- PageModule.prototype.load = function( Page1 )
- {
- Page1.getControlByName( "txtPostalCode" ).setValidator( myPostalCodeValidator.bind( null, /^[A-Z][0-9][A-Z] [0-9][A-Z][0-9]$/));
- };
- return PageModule;
- });
|