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
form_set_error('menu_name',format_plural(MENU_MAX_MENU_NAME_LENGTH_UI,"The menu name can't be longer than 1 character.","The menu name can't be longer than @count characters."));
form_set_error('menu_name',format_plural(MENU_MAX_MENU_NAME_LENGTH_UI,"The menu name can't be longer than 1 character.","The menu name can't be longer than @count characters."));
}
// We will add 'menu-' to the menu name to help avoid name-space conflicts.
$item['menu_name']='menu-'.$item['menu_name'];
$custom_exists=db_query('SELECT menu_name FROM {menu_custom} WHERE menu_name = :menu',array(':menu'=>$item['menu_name']))->fetchField();
// Verify that using a menu_name that is too long results in a validation message.
$this->assertText(format_plural(MENU_MAX_MENU_NAME_LENGTH_UI,"The menu name can't be longer than 1 character.","The menu name can't be longer than @count characters."),t('Validation failed when menu name is too long.'));
// Change the menu_name so it no longer exceeds the maximum length.
// Verify that no validation error is given for menu_name length.
$this->assertNoText(format_plural(MENU_MAX_MENU_NAME_LENGTH_UI,"The menu name can't be longer than 1 character.","The menu name can't be longer than @count characters."),t('Validation failed when menu name is too long.'));
// Unlike most other modules, there is no confirmation message displayed.