Skip to content

Commit 5464967

Browse files
committed
update
1 parent 9610c1b commit 5464967

File tree

8 files changed

+23
-15
lines changed

8 files changed

+23
-15
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A lightweight, Laravel-inspired validation package for Vue 3. Effortlessly valid
1111
- [Getting started](#getting-started)
1212
- [Advantages of using this solution](#advantages-of-using-this-solution)
1313
- [🔥 Key benefits](#-key-benefits)
14-
- [🚀 How It Works](#-how-it-works)
14+
- [🚀 Features](#-features)
1515
- [Installation](#installation)
1616
- [Setup](#setup)
1717
- [Usage](#usage)
@@ -30,7 +30,7 @@ A lightweight, Laravel-inspired validation package for Vue 3. Effortlessly valid
3030

3131
## Advantages of using this solution
3232

33-
`@kolirt/vue-validation-kit` is a convenient and powerful package for data validation in Vue.js applications. It provides a simple and intuitive solution for form validation, inspired by the validation system of the Laravel framework, making it particularly user-friendly for developers familiar with this technology. The package allows seamless integration of validation into projects while keeping the code clean and structured.
33+
`vue-validation-kit` is a convenient and powerful package for data validation in Vue.js applications. It provides a simple and intuitive solution for form validation, inspired by the validation system of the Laravel framework, making it particularly user-friendly for developers familiar with this technology. The package allows seamless integration of validation into projects while keeping the code clean and structured.
3434

3535

3636
### 🔥 Key benefits:
@@ -53,12 +53,12 @@ With vue-validation-kit, you can focus on your application’s logic rather than
5353

5454
## Installation
5555

56-
Use yarn or npm to install the package `@kolirt/vue-validation-kit`.
56+
Use yarn or npm to install the package `vue-validation-kit`.
5757

5858
```bash
59-
npm install --save @kolirt/vue-validation-kit
59+
npm install --save vue-validation-kit
6060

61-
yarn add @kolirt/vue-validation-kit
61+
yarn add vue-validation-kit
6262
```
6363

6464
## Setup
@@ -67,8 +67,8 @@ Add dependencies to your `main.ts`:
6767

6868
```javascript
6969
import { createApp } from 'vue'
70-
import { createValidation } from '@kolirt/vue-validation-kit'
71-
import { en } from '@kolirt/vue-validation-kit/localization'
70+
import { createValidation } from 'vue-validation-kit'
71+
import { en } from 'vue-validation-kit/localization'
7272

7373
const app = createApp({ ... })
7474

@@ -84,6 +84,11 @@ app.mount('#app')
8484

8585
## Basic usage
8686

87+
```vue
88+
<script setup lang="ts">
89+
90+
</script>
91+
```
8792

8893

8994

lib/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ export type { Messages, Rule, Options } from './types'
22
export { locale, messages, setLocale, setMessages } from './options'
33
export { createValidation } from './plugin'
44
export { useForm } from './useForm'
5+
6+
// export const test = 'hello';

lib/rules/requiredIf.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import type { Rule } from '../types'
22

3-
export function requiredIf(
4-
// path: string,
5-
// mode: 'in' | 'notIn' | 'eq' | 'less' | 'greater' | 'between' | 'notBetween',
6-
// value: any
7-
): Rule {
3+
export function requiredIf(): Rule {
4+
// path: string,
5+
// mode: 'in' | 'notIn' | 'eq' | 'less' | 'greater' | 'between' | 'notBetween',
6+
// value: any
87
return {
98
name: 'required',
109
validate: (/*{ value: fieldValue }*/) => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-validation-kit",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"type": "module",
55
"description": "A lightweight, Laravel-inspired validation package for Vue 3",
66
"author": "kolirt",

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { notify } from '@kyvg/vue3-notification'
33
import { ref } from 'vue'
44
5-
import { type Options, messages, locale, setLocale, setMessages, useForm, type Messages } from '../lib'
5+
import { type Messages, type Options, locale, messages, setLocale, setMessages, useForm } from '../lib'
66
import ValidationField from '../lib/components/ValidationField.vue'
77
import ValidationForm from '../lib/components/ValidationForm.vue'
88
import * as Rules from '../lib/rules'

src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import en from './localization/en'
1010
const app = createApp(App)
1111

1212
app.use(Notifications)
13+
1314
app.use(
1415
createValidation({
1516
locale: 'en',

tsconfig.lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
"forceConsistentCasingInFileNames": true,
1515
"resolveJsonModule": true
1616
},
17+
"include": ["lib/**/*"],
1718
"exclude": ["test", "demo", "node_modules", "examples"]
1819
}

vite.lib.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig({
1111
vue(),
1212
dts({
1313
tsConfigFilePath: './tsconfig.lib.json',
14-
rollupTypes: true
14+
include: ['lib/index.ts', 'lib/localization/index.ts', 'lib/rules/index.ts']
1515
}),
1616
eslint()
1717
],

0 commit comments

Comments
 (0)