scoop-form
v0.5.9
Published
Form components with a11y and validation
Maintainers
Readme
scoop-form
A collection of form components and utils for validation and handling basic a11y tasks, such as focussing the first erroneous field or placing the error message inside the label.
This software is hardly bound to our clients needs.
Install
yarn add scoop-formBasic example
<template>
<VForm :form="myForm" @submit="onSubmit">
<VInput name="input1" :required="true" hint="Err msg" placeholder="..." legend="Label xyz" />
</VForm>
</template>
<script>
import { Form, Input, initFields } from 'scoop-form';
export default {
name: 'Example',
components: {
Form,
Input,
},
data() {
return {
myForm: initFields({ name: 'input1' }),
};
},
methods: {
onSubmit({ values, form, isValid }) {
// ...
},
},
};
</script>Project setup
yarn installCompiles and hot-reloads for development
yarn devCompiles for npm
yarn run build:npmPublish on npm
npm publish --access publicRun your tests
yarn run test:e2eLints and fixes files
yarn run lint