Repository: baianat/vee-validate
Pull request #1758 (2018-12-17 15:56:22)

docs: correct value to disable aria-* attributes
🔎 __Overview__

Docs were incorrect on this part, using `true` instead of `false` to disable aria-* attributes


codecov[bot]: # [Codecov](https://codecov.io/gh/baianat/vee-validate/pull/1758?src=pr&el=h1) Report
> Merging [#1758](https://codecov.io/gh/baianat/vee-validate/pull/1758?src=pr&el=desc) into [master](https://codecov.io/gh/baianat/vee-validate/commit/71e83093d34dd381be2f9eb34af0f7359faaa363?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/baianat/vee-validate/pull/1758/graphs/tree.svg?width=650&token=XFzlvHKFP5&height=150&src=pr)](https://codecov.io/gh/baianat/vee-validate/pull/1758?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master    #1758   +/-   ##
=======================================
  Coverage   97.68%   97.68%           
=======================================
  Files          57       57           
  Lines        2120     2120           
  Branches      658      658           
=======================================
  Hits         2071     2071           
  Misses         43       43           
  Partials        6        6
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/baianat/vee-validate/pull/1758?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/baianat/vee-validate/pull/1758?src=pr&el=footer). Last update [71e8309...d174a03](https://codecov.io/gh/baianat/vee-validate/pull/1758?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/docs/guide/classes-and-styling.md b/docs/guide/classes-and-styling.md
index 4da839d7..b0ffd534 100644
--- a/docs/guide/classes-and-styling.md
+++ b/docs/guide/classes-and-styling.md
@@ -81,7 +81,7 @@ VeeValidate also applies a couple of aria attributes on your HTML inputs:
 
 You could use these attributes for CSS selectors to apply specific styling to fields applied with those aria attributes.
 
-This feature is __enabled__ by default and can be disabled by setting the `aria` option to true in the plugin configuration.
+This feature is __enabled__ by default and can be disabled by setting the `aria` option to `false` in the plugin configuration.
 
 ```js
 import Vue from 'vue';
diff --git a/src/core/validatorDecorator.js b/src/core/validatorDecorator.js
index 56844ccc..25eb3e07 100644
--- a/src/core/validatorDecorator.js
+++ b/src/core/validatorDecorator.js
@@ -74,8 +74,8 @@ export default class ScopedValidator {
     return this._base.remove(ruleName);
   }
 
-  detach (...args) {
-    return this._base.detach(...args, this.id);
+  detach (name, scope) {
+    return this._base.detach(name, scope, this.id);
   }
 
   extend (...args) {
diff --git a/src/rules/alpha_helper.js b/src/rules/alpha_helper.js
index 2b3bc136..a4d991e8 100644
--- a/src/rules/alpha_helper.js
+++ b/src/rules/alpha_helper.js
@@ -18,6 +18,7 @@ export const alpha = {
   ru: /^[А-ЯЁ]*$/i,
   sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,
   sr: /^[A-ZČĆŽŠĐ]*$/i,
+  sv: /^[A-ZÅÄÖ]*$/i,
   tr: /^[A-ZÇĞİıÖŞÜ]*$/i,
   uk: /^[А-ЩЬЮЯЄІЇҐ]*$/i,
   ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/
@@ -38,6 +39,7 @@ export const alphaSpaces = {
   ru: /^[А-ЯЁ\s]*$/i,
   sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\s]*$/i,
   sr: /^[A-ZČĆŽŠĐ\s]*$/i,
+  sv: /^[A-ZÅÄÖ\s]*$/i,
   tr: /^[A-ZÇĞİıÖŞÜ\s]*$/i,
   uk: /^[А-ЩЬЮЯЄІЇҐ\s]*$/i,
   ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/
@@ -58,6 +60,7 @@ export const alphanumeric = {
   ru: /^[0-9А-ЯЁ]*$/i,
   sk: /^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,
   sr: /^[0-9A-ZČĆŽŠĐ]*$/i,
+  sv: /^[0-9A-ZÅÄÖ]*$/i,
   tr: /^[0-9A-ZÇĞİıÖŞÜ]*$/i,
   uk: /^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,
   ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/
@@ -78,6 +81,7 @@ export const alphaDash = {
   ru: /^[0-9А-ЯЁ_-]*$/i,
   sk: /^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,
   sr: /^[0-9A-ZČĆŽŠĐ_-]*$/i,
+  sv: /^[0-9A-ZÅÄÖ_-]*$/i,
   tr: /^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,
   uk: /^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,
   ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/


Test patch:
diff --git a/tests/unit/validatorDecorator.js b/tests/unit/validatorDecorator.js
index 64ff2eaf..adebbce1 100644
--- a/tests/unit/validatorDecorator.js
+++ b/tests/unit/validatorDecorator.js
@@ -66,6 +66,22 @@ test('decorates flag()', () => {
   expect(base.flag).toHaveBeenCalledWith('name', { valid: false }, 0);
 });
 
+test('decorates detach()', () => {
+  const base = new Validator();
+  const decorator = new Decorator(base, { _uid: 0 });
+
+  decorator.attach({ name: 'email1' });
+  decorator.attach({ name: 'email2' });
+  decorator.attach({ name: 'email3', scope: 'scope' });
+
+  decorator.detach('email1');
+  decorator.detach('email2', null);
+  decorator.detach('email3', 'scope');
+
+  expect(base.fields.items).toHaveLength(0);
+  expect(decorator.fields.items).toHaveLength(0);
+});
+
 test('calls extend()', () => {
   const vm = { _uid: 0 };
   const base = new Validator();