----------------------------------------
* CRM-13475: Entering an invalid credit card number gives the wrong field validation error
http://issues.civicrm.org/jira/browse/CRM-13475
'title' => ts('Card Type'),
'cc_field' => TRUE,
'attributes' => $creditCardType,
- 'is_required' => TRUE,
+ 'is_required' => FALSE,
);
}
/**
* Function to add all the credit card fields
*
- * @return None
+ * @return void
* @access public
*/
static function buildCreditCard(&$form, $useRequired = FALSE) {
$errors['cvv2'] = ts('Please enter a valid Credit Card Verification Number');
}
}
+ elseif (!empty($values['credit_card_number'])) {
+ $errors['credit_card_number'] = ts('Please enter a valid Credit Card Number and Type');
+ }
}
/**