diff --git a/config/install/clientside_validation.settings.yml b/config/install/clientside_validation.settings.yml
new file mode 100644
index 0000000..43a5706
--- /dev/null
+++ b/config/install/clientside_validation.settings.yml
@@ -0,0 +1,6 @@
+rule:
+  key_prefix: 'rule'
+  key_suffix: ''
+message:
+  key_prefix: 'msg'
+  key_suffix: ''
\ No newline at end of file
diff --git a/src/CvValidatorBase.php b/src/CvValidatorBase.php
index f329da6..022b6d1 100644
--- a/src/CvValidatorBase.php
+++ b/src/CvValidatorBase.php
@@ -5,17 +5,54 @@ namespace Drupal\clientside_validation;
 use Drupal\Component\Plugin\PluginBase;
 use Drupal\Component\Serialization\Json;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\Component\Utility\NestedArray;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
 
 /**
  * Class CvValidatorBase.
  *
  * @package Drupal\clientside_validation
  */
-abstract class CvValidatorBase extends PluginBase implements CvValidatorInterface {
+abstract class CvValidatorBase extends PluginBase implements CvValidatorInterface, ContainerFactoryPluginInterface {
   use StringTranslationTrait;
 
+  /**
+   * Clientside validation settings.
+   *
+   * @var array
+   */
+  protected $settings;
+
+  /**
+   * Constructs a CvValidatorBase object.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   * @param array $settings
+   *   The clientside validation settings.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, array $settings) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->settings = $settings;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('config,factory')->get('clientside_validation.settings')
+    );
+  }
+
   /**
    * {@inheritdoc}
    */
@@ -42,12 +79,12 @@ abstract class CvValidatorBase extends PluginBase implements CvValidatorInterfac
     $rules = $this->getRules($element, $form_state);
     if (isset($rules['rules'])) {
       foreach ($rules['rules'] as $rulename => $rulearg) {
-        $element['#attributes']['data-rule-' . mb_strtolower($rulename)] = is_object($rulearg) || is_array($rulearg) ? Json::encode($rulearg) : $rulearg;
+        $element['#attributes'][$this->getAttributeKey('rule', $rulename)] = is_object($rulearg) || is_array($rulearg) ? Json::encode($rulearg) : $rulearg;
       }
     }
     if (isset($rules['messages'])) {
       foreach ($rules['messages'] as $rulename => $message) {
-        $element['#attributes']['data-msg-' . mb_strtolower($rulename)] = $message;
+        $element['#attributes'][$this->getAttributeKey('message', $rulename)] = $message;
       }
     }
     if (isset($rules['messages']) || isset($rules['rules'])) {
@@ -58,6 +95,26 @@ abstract class CvValidatorBase extends PluginBase implements CvValidatorInterfac
     }
   }
 
+  /**
+   * Get the key of an attribute for rule or message data attributes.
+   *
+   * @param string $attributetype
+   *   The attrbiute type, either rule or message.
+   * @param string $rulename
+   *   The rule name to build the keys for.
+   *
+   * @return mixed
+   *   The attribute key.
+   */
+  protected function getAttributeKey($attributetype, $rulename) {
+    return implode('-', array_filter([
+      'data',
+      $this->settings[$attributetype]['key_prefix'],
+      mb_strtolower($rulename),
+      $this->settings[$attributetype]['key_suffix'],
+    ]));
+  }
+
   /**
    * Get the value of an attribute of an element.
    *
diff --git a/src/Form/SettingsForm.php b/src/Form/SettingsForm.php
new file mode 100644
index 0000000..cabc83f
--- /dev/null
+++ b/src/Form/SettingsForm.php
@@ -0,0 +1,89 @@
+<?php
+
+namespace Drupal\clientside_validation\Form;
+
+use Drupal\Core\Form\ConfigFormBase;
+use Drupal\Core\Form\FormStateInterface;
+
+/**
+ * Class SettingsForm.
+ */
+class SettingsForm extends ConfigFormBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getEditableConfigNames() {
+    return [
+      'clientside_validation.settings',
+    ];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormId() {
+    return 'clientside_validation_settings_form';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
+    $config = $this->config('clientside_validation.settings');
+
+    $form['keys'] = [
+      '#type' => 'details',
+      '#title' => $this->t('Attribute Data Keys'),
+      '#description' => $this->t('Configure the keys for the validation data attributes'),
+      '#open' => TRUE,
+    ];
+
+    $form['keys']['rule__key_prefix'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Rule Key Prefix'),
+      '#description' => $this->t('Configure the rule attribute key preceeding the rule name'),
+      '#default_value' => $config->get('rule.key_prefix'),
+    ];
+
+    $form['keys']['rule__key_suffix'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Rule Key Suffix'),
+      '#description' => $this->t('Configure the rule attribute key following the rule name'),
+      '#default_value' => $config->get('rule.key_suffix'),
+    ];
+
+    $form['keys']['message__key_prefix'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Message Key Prefix'),
+      '#description' => $this->t('Configure the message attribute key preceeding the rule name'),
+      '#default_value' => $config->get('message.key_prefix'),
+    ];
+
+    $form['keys']['message__key_suffix'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Message Key Suffix'),
+      '#description' => $this->t('Configure the message attribute key following the rule name'),
+      '#default_value' => $config->get('message.key_suffix'),
+    ];
+
+    return parent::buildForm($form, $form_state);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    parent::submitForm($form, $form_state);
+
+    $config = $this->config('clientside_validation.settings');
+
+    $config->set('rule.key_prefix', $form_state->getValue('rule__key_prefix'));
+    $config->set('rule.key_suffix', $form_state->getValue('rule__key_suffix'));
+    $config->set('message.key_prefix', $form_state->getValue('message__key_prefix'));
+    $config->set('message.key_suffix', $form_state->getValue('message__key_suffix'));
+
+    $config->save();
+  }
+
+}
