@radiantabyss/vue 3.1.4 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radiantabyss/vue",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "author": "radiantabyss.com",
5
5
  "license": "ISC",
6
6
  "eslintConfig": {
@@ -1,16 +0,0 @@
1
- let self = {
2
- error(messages) {
3
- return {
4
- success: false,
5
- messages,
6
- }
7
- },
8
-
9
- success() {
10
- return {
11
- success: true
12
- }
13
- }
14
- }
15
-
16
- export default self;
@@ -1,27 +0,0 @@
1
- import * as ValidatorJS from 'validatorjs';
2
-
3
- let self = {
4
- make(data, rules, messages) {
5
- //format messages
6
- let formatted_messages = {};
7
- for ( let key in messages ) {
8
- let split = key.split('.');
9
- let pop = Array.from(split);
10
- pop.pop();
11
- formatted_messages[`${split[split.length - 1]}.${pop.join('.')}`] = messages[key];
12
- }
13
-
14
- let validator = new ValidatorJS(data, rules, formatted_messages);
15
-
16
- return {
17
- passes() {
18
- return validator.passes();
19
- },
20
- messages() {
21
- return Object.values(validator.errors.all());
22
- },
23
- };
24
- }
25
- }
26
-
27
- export default self;