feature/field-error
Björn 4 years ago
parent c5b237dd2b
commit 809e15744d

@ -15,7 +15,7 @@ npm install tiny-validator --save
## How to use ## How to use
``` ```javascript
<demo> <demo>
<form onsubmit={ (event) => { state.validator.handle(event) }} novalidate> <form onsubmit={ (event) => { state.validator.handle(event) }} novalidate>
<div class="field"> <div class="field">
@ -36,13 +36,12 @@ npm install tiny-validator --save
</form> </form>
<script> <script>
import Validator from './validator.js' import Validator from './validator.js'
export default { export default {
onBeforeMount() { onBeforeMount() {
this.state.validator = new Validator({ this.state.validator = new Validator({
name: { email: {
presence: true presence: true
email: true email: true
}, },

@ -23,7 +23,7 @@
export default { export default {
onBeforeMount() { onBeforeMount() {
this.state.validator = new Validator({ this.state.validator = new Validator({
name: { email: {
presence: true, presence: true,
email: true email: true
}, },

2
dist/js/demo.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save