# matthijsfontystest

> form validation for vue.js

Latest version **1.0.0** (published 2020-05-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install matthijsfontystest
pnpm add matthijsfontystest
yarn add matthijsfontystest
bun add matthijsfontystest
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-05-11 |
| First published | 2020-05-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | MatthijsFontys |
| Maintainers | matthijsfontys |

## Links

- npm: https://www.npmjs.com/package/matthijsfontystest
- npm.io page: https://npm.io/package/matthijsfontystest

## Recent versions

- 1.0.0 (latest) — 2020-05-11

## README

# Easy Vue Form
Generic library for validating your Vue forms

#### Functionality
- Validation functions
- Default values
- Field comparison
  
#### Documentation
- JSdocs


#### Examples
import
```js
// Necessary validation methods
import {isEmail, isFilledIn, isSameAs} from 'easyvueform'
// Class that validates the form
import FormHelper from 'easyvueform/FormHelper'
// Form field represtation
import FormField from 'easyvueform/FormField'
```

setup
```js
export default {
  data(){
    return{
      form: {
        email: new FormField("example@default.com",isEmail()),
        confirmEmail: new FormField(isSameAs("email")),
        password: new FormField(isFilledIn())
      },
      formHelper: null,
    }

  },

  created() {
      this.formHelper = new FormHelper(this.form);
  }
```

validation
```js
methods: {
    validateForm(){
        this.formHelper.validateForm();
    }
}
```

example input field
```html
<input type="email" 
       v-model="form.email.value"
       v-bind:class="{error: !form.email.isValid}"/>
```

---
_Source: https://npm.io/package/matthijsfontystest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
