0.1.0 • Published 5 years ago
vee-validate-devextreme v0.1.0
vee-validate-devextreme is an integration of Vee-Validate and DevExtreme's Vue Components
Getting Started
Vue version support
This version supports only v4 of vee-validate and thus, only supports Vue 3.x
Usage
Declarative Components (Recommended)
Higher-order components are better suited for most of your cases. Register the Field and Form components and create a simple required validator:
import { Form } from 'vee-validate';
import { DxField } from 'vee-validate-devextreme';
export default {
components: {
DxField,
Form,
},
methods: {
isRequired(value) {
return value ? true : 'This field is required';
},
};Then use the Form and DxField components to render your form:
<Form v-slot="{ errors }">
<DxField name="field" :rules="isRequired" />
<span>{{ errors.field }}</span>
</Form>The DxField component renders a component of type DxTextBox by default but you can control that
Contributing
You are welcome to contribute to this project, but before you do, please make sure you read the contribution guide
Credits
- Borrowed and imitate project structure of Vee-validate
⚖️ License
MIT
0.1.0
5 years ago