Skip to content
Snippets Groups Projects
Commit 8ceb91fc authored by Jess's avatar Jess
Browse files

Issue #3103010 by AndrewsizZ, No Sssweat, jungle, Lendude, jshimota01: Machine...

Issue #3103010 by AndrewsizZ, No Sssweat, jungle, Lendude, jshimota01: Machine Name needs further clarification

(cherry picked from commit 0e336272)
parent 47e0074e
No related branches found
No related tags found
No related merge requests found
......@@ -1868,7 +1868,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) {
case 'display_id':
if ($form_state->getValue('display_id')) {
if (preg_match('/[^a-z0-9_]/', $form_state->getValue('display_id'))) {
$form_state->setError($form['display_id'], $this->t('Display name must be letters, numbers, or underscores only.'));
$form_state->setError($form['display_id'], $this->t('Display machine name must contain only lowercase letters, numbers, or underscores.'));
}
foreach ($this->view->displayHandlers as $id => $display) {
......
......@@ -77,7 +77,7 @@ public function testOtherOptions() {
// Test the form validation with invalid IDs.
$machine_name_edit_url = 'admin/structure/views/nojs/display/test_view/test_1/display_id';
$error_text = t('Display name must be letters, numbers, or underscores only.');
$error_text = t('Display machine name must contain only lowercase letters, numbers, or underscores.');
// Test that potential invalid display ID requests are detected
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment