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

Not possible to use validation groups with radio inputs #234

@priithansen

Description

@priithansen

vue & vue-validator version

1.0.24, 2.1.1

Reproduction Link

https://jsfiddle.net/gfd06j7o/

Steps to reproduce

1 - Add group="group1" to one or both radio inputs in the jsfiddler.

What is Expected?

Possible to validate radio inputs based on groups like described in docs http://vuejs.github.io/vue-validator/en/grouping.html for regular inputs

What is actually happening?

vue-validator.js:1912 - Uncaught TypeError: Cannot read property 'validation' of undefined

which is the "var validation =" line in the following code snippet

  Validator.prototype.addGroupValidation = function addGroupValidation(group, field) {
      var indexOf = exports$1.Vue.util.indexOf;

      var validation = this._validations[field] || this._checkboxValidations[field].validation || this._radioValidations[field].validation;
      var validations = this._groupValidations[group];

      validations && ! ~indexOf(validations, validation) && validations.push(validation);
    };

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions