Edgar Navasardyan
Edgar Navasardyan

Reputation: 4501

Parsley's EXCLUDED not recognizing :last

I am trying to make Parlsley validate all the rows in the table except the last one, and it seems to ignore me )

$('form').parsley({
            excluded: 'tr:last'
        }).validate();

Here's the JSFIddle

Any ideas ?

Upvotes: 1

Views: 85

Answers (1)

Marc-André Lafortune
Marc-André Lafortune

Reputation: 79562

excluded works by filtering your inputs, i.e:

$yourForm.find(inputs).not(excluded)`

It does not "redo" the search from the form level, i.e. it does not do:

$yourForm.find(inputs).not($yourForm.find(excluded))  # *Not* the way Parsley treats `excluded`

Your excluded selector is thus ineffective.

Upvotes: 1

Related Questions