Index: trunk/extensions/DonationInterface/globalcollect_gateway/modules/js/validate.js |
— | — | @@ -243,12 +243,13 @@ |
244 | 244 | */ |
245 | 245 | function validateElementState( options ) { |
246 | 246 | |
247 | | - if ( !$("#state").length ) { |
248 | | - return; |
249 | | - } |
250 | | - |
251 | 247 | $().ready(function() { |
252 | 248 | |
| 249 | + // Do not try to validate state if the field does not exist. |
| 250 | + if ( !$("#state").length ) { |
| 251 | + return; |
| 252 | + } |
| 253 | + |
253 | 254 | $("#state").rules("add", |
254 | 255 | { |
255 | 256 | required: true, |