Skip to content
Snippets Groups Projects
Commit 0e8d1e81 authored by Angie Byron's avatar Angie Byron
Browse files

#540798 by kjy07 and Jody Lynn: Require image style names.

parent 527054dd
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -55,6 +55,7 @@ function image_style_form(&$form_state, $style) {
'#default_value' => $style['name'],
'#description' => t('The name is used in URLs for generated images. Use only lowercase alphanumeric characters, underscores (_), and hyphens (-).'),
'#element_validate' => array('image_style_name_validate'),
'#required' => TRUE,
);
// Build the list of existing image effects for this image style.
......@@ -196,6 +197,7 @@ function image_style_add_form(&$form_state) {
'#default_value' => '',
'#description' => t('The name is used in URLs for generated images. Use only lowercase alphanumeric characters, underscores (_), and hyphens (-).'),
'#element_validate' => array('image_style_name_validate'),
'#required' => TRUE,
);
$form['submit'] = array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment