Projet

Général

Profil

Révision c169e7c4

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/colorbox/colorbox.module
396 396
 * Validate function for colorbox_gallery_custom.
397 397
 */
398 398
function colorbox_gallery_custom_validate($element, &$form_state) {
399
  if ($form_state['values']['fields']['field_image']['settings_edit_form']['settings']['colorbox_gallery'] == 'custom' && !preg_match('!^[a-z0-9_-]+$!', $element['#value'])) {
399
  if (!empty($element['#value']) && !preg_match('!^[a-z0-9_-]+$!', $element['#value'])) {
400 400
    form_error($element, t('%name must only contain lowercase letters, numbers, hyphen and underscores.', array('%name' => $element['#title'])));
401 401
  }
402 402
}

Formats disponibles : Unified diff