Skip to content
This repository has been archived by the owner on Dec 25, 2017. It is now read-only.

intial="off" does not work with type="radio" and type="checkbox" #208

Closed
yuhangbest0317 opened this issue Apr 27, 2016 · 0 comments
Closed
Labels

Comments

@yuhangbest0317
Copy link

yuhangbest0317 commented Apr 27, 2016

vue & vue-validator version

v1.0.18, v2.0.2

Reproduction Link

Steps to reproduce

What is Expected?

What is actually happening?

when I write initial="off" in the input type="checkbox" or type="radio", open Chrome, the error tips is still exist no matter I was first open.
code as follow:

       <validator name="validation1">
            <form novalidate>
              <h1>Survey</h1>
              <fieldset>
                <legend>Which do you like fruit ?</legend>
                <!-- checkbox、radio使用initial="off"不生效 -->
                <input id="apple" type="radio" name="fruit" initial="off" value="apple" v-validate:fruits="{
                  required: true
                }">
                <label for="apple">Apple</label>
                <input id="orange" type="radio" name="fruit" value="orange" initial="off" v-validate:fruits>
                <label for="orange">Orage</label>
                <input id="grape" type="radio" name="fruit" value="grape" initial="off" v-validate:fruits>
                <label for="grape">Grape</label>
                <input id="banana" type="radio" name="fruit" value="banana" initial="off" v-validate:fruits>
                <label for="banana">Banana</label>
                <p v-if="$validation1.fruits.required">required fields</p>
                <p>{{$validation1.fruits | json}}</p>
              </fieldset>
            </form>
          </validator>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants