View on GitHub

Parsely-conditions

A jQuery plugin that adds conditional logic to the Parsely.js form validation library

Download this project as a .zip file Download this project as a tar.gz file

< Back to home

Simple Example Without Show / Hide

This is a simple example of form validation. It uses the code displayed on the plugin homepage. Selecting "Yes" from the drop down will add validation to the second field.

Do you like ice cream?
What's your favorite flavour?

Here's the plugin code used for this example.

var fValidate = $.parselyConditions({
        formname: 'customForm',
        validationfields: [{
            fid: 'formTrigger',
            ftype: 'select',
            fvalue: 'yes',
            faffected: 'toggledField',
            fhide: false
        }],
    });