function isbn_dynamic_validation in ISBN Field 6
1 call to isbn_dynamic_validation()
- isbn_field_process in ./
isbn.module - Process an individual element.
File
- ./
isbn.module, line 516 - Defines ISBN field types.
Code
function isbn_dynamic_validation() {
static $complete = FALSE;
global $user;
// Only need to do once per page.
if (!$complete) {
//drupal_add_js(drupal_get_path('module', 'isbn') .'/isbn.js', 'module');
drupal_add_js(drupal_get_path('module', 'isbn') . '/isbn_attach.js', 'module');
drupal_add_js(array(
'isbn' => array(
'validateURL' => url('isbn/validate'),
'confirmSuccess' => t('Valid ISBN/ISSN number.'),
'confirmFailure' => t('Not a valid ISBN/ISSN Number.'),
'notEnoughDigits' => t('Not Enough Digits! '),
'tooManyDigits' => t('Too Many Digits! '),
'requiredDigits' => t(' digits are required.'),
'missingPrefix13' => t('13 Digit ISBNs need to begin with 978 or 979.'),
),
), 'setting');
$complete = TRUE;
}
}