Skip to content
This repository was archived by the owner on Aug 17, 2021. It is now read-only.
This repository was archived by the owner on Aug 17, 2021. It is now read-only.

Validation not working for text input fields #3

Description

@TMDX

Following the markup in the examples, validation doesn't seem to work on any of the text input fields.

This is caused by the variable $formgroup inside of the checkTextFields function. Its currently declared as .form-group which means it skips over the data-required hook in the subsequent if statement.

I'm not sure if this was intentional, but you can fix it by moving the attribute in the markup to the .form-group class or by adjusting the plugin as below:

Current:
var $formgroup = $(this).parents('.form-group');

Fix:
var $formgroup = $(this).parents('fieldset');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions