Skip to content
Snippets Groups Projects
Commit 2cbc6feb authored by renatog's avatar renatog Committed by renatog
Browse files

Issue #3271920 by RenatoG: After the validation on special char explain that...

Issue #3271920 by RenatoG: After the validation on special char explain that is possible to modify that in the settings page
parent d9c65473
Branches
Tags
10 merge requests!62Issue #3272848 by RenatoG: When the error appear the field is hidden and the...,!59Issue #3497768: Click JavaScript to close details causes modals to scroll unnecessarily,!35Issue #3366420: \Drupal calls should be avoided in classes,!34Issue #3366420: \Drupal calls should be avoided in classes,!29Issue #3272632 by RenatoG: Add a logic to block and disable the remove item if...,!28Issue #3272632 by RenatoG: Add a logic to block and disable the remove item if...,!23Issue #3272632 by RenatoG: Add a logic to block and disable the remove item if...,!22Issue #3272632 by RenatoG: Add a logic to block and disable the remove item if...,!20Issue #3272632 by RenatoG: Add a logic to block and disable the remove item if...,!7Issue #3320529 by justcaldwell: block_classes_stored setting only retains classes from most recently saved block
......@@ -737,8 +737,12 @@ class BlockClassHelperService {
// Verify if there is a special char on this class.
if (preg_match('/[\'^£$%&*()}{@#~?><>,|=+¬]/', $item)) {
$url_settings_page = Url::fromRoute('block_class.settings')->toString();
// If there is a special chat return the error for the user.
$form_state->setErrorByName('class][third_party_settings][block_class][' . $key, $this->t("In class is allowed only letters, numbers, hyphen and underline"));
$form_state->setErrorByName('class][third_party_settings][block_class][' . $key, $this->t('Special chars is not enabled in the class value. To enable this, go to the <a href="@url_settings_page@">settings page</a>', [
'@url_settings_page@' => $url_settings_page,
]));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment