@globalbrain/sefirot
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -0,1 +1,3 @@ | ||
import ValidationError from '../errors/ValidationError' | ||
export default class validation { | ||
@@ -13,2 +15,16 @@ /** | ||
/** | ||
* Touch the given field. | ||
* | ||
* @param {Vuelidate} v | ||
* @return {void} | ||
*/ | ||
static validate (v) { | ||
this.touch(v) | ||
if (v.$invalid) { | ||
throw new ValidationError('Form is invalid') | ||
} | ||
} | ||
/** | ||
* Get name of rule which has error in given validation object. | ||
@@ -15,0 +31,0 @@ * |
MIT License | ||
Copyright (c) 2019 Global Brain | ||
Copyright (c) 2019 Global Brain Corporation | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"name": "@globalbrain/sefirot", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Vue Components for Global Brain Design System.", | ||
@@ -32,4 +32,5 @@ "files": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.4.5", | ||
"@babel/core": "^7.5.4", | ||
"@nuxtjs/dotenv": "^1.3.0", | ||
"@nuxtjs/markdownit": "^1.2.5", | ||
"@vue/test-utils": "^1.0.0-beta.29", | ||
@@ -43,3 +44,3 @@ "babel-core": "^6.26.3", | ||
"css-loader": "^2.1.1", | ||
"dayjs": "^1.8.14", | ||
"dayjs": "^1.8.15", | ||
"eslint": "^5.16.0", | ||
@@ -50,2 +51,3 @@ "eslint-loader": "^2.1.2", | ||
"jest-serializer-vue": "^2.0.2", | ||
"markdown-it-highlight": "^0.2.0", | ||
"normalize.css": "^8.0.1", | ||
@@ -61,3 +63,3 @@ "nuxt": "^2.8.1", | ||
"vue-loader": "^15.7.0", | ||
"vue-router": "^3.0.6", | ||
"vue-router": "^3.0.7", | ||
"vue-server-renderer": "^2.6.10", | ||
@@ -67,3 +69,3 @@ "vue-template-compiler": "^2.6.10", | ||
"vuelidate": "^0.7.4", | ||
"webpack": "^4.35.0", | ||
"webpack": "^4.35.3", | ||
"webpack-dev-server": "^3.7.2" | ||
@@ -70,0 +72,0 @@ }, |
@@ -1,4 +0,8 @@ | ||
# Sefirot | ||
<p align="center"> | ||
<img width="128" src="https://github.com/globalbrain/sefirot/raw/master/logo-sefirot.png" alt="Sefirot"> | ||
</p> | ||
<p> | ||
<h1 align="center">Sefirot</h1> | ||
<p align="center"> | ||
<a href="https://travis-ci.org/globalbrain/sefirot"> | ||
@@ -49,3 +53,3 @@ <img src="https://travis-ci.org/globalbrain/sefirot.svg?branch=master" alt="Travis CI"> | ||
When compiling your project, don't forget to transpire the code. For example, in Nuxt, you should define the following settings at `nuxt.config.js`. | ||
When compiling your project, don't forget to transpile the code. For example, in Nuxt, you should define the following settings at `nuxt.config.js`. | ||
@@ -95,1 +99,37 @@ ```js | ||
> — <cite>@mdo</cite> | ||
### Development | ||
```bash | ||
$ npm run serve | ||
``` | ||
Serve documentation website at http://localhost:3000. | ||
```bash | ||
$ npm run lint | ||
``` | ||
Lint files using a rule of Standard JS. | ||
```bash | ||
$ npm run test | ||
``` | ||
Run the test. | ||
```bash | ||
$ npm run test:watch | ||
``` | ||
Run the test in watch mode. | ||
```bash | ||
$ npm run test:coverage | ||
``` | ||
Generate test coverage in `coverage` directory. | ||
## License | ||
Sefirot is open-sourced software licensed under the [MIT license](LICENSE.md). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
98497
72
306
134
35