Select2 and validationEngine Not Working

2,123 views
Skip to first unread message

msp...@gmail.com

unread,
Oct 2, 2012, 4:48:15 PM10/2/12
to sel...@googlegroups.com
I'm attempting to use this validation plugin, http://www.position-relative.net/creation/formValidator/js/jquery.validationEngine.js with select2 and am having no luck making it work.

This fiddle will show how a "normal" select gets validated while a select2 is NOT , http://jsfiddle.net/VLHN8/7/

This link, https://github.com/ivaynberg/select2/pull/374, claims that there is a special fix to select2 for the validationEngine plugin, however, it doesn't work for me. Anyone have any idea where I'm going wrong?

rener...@gmail.com

unread,
Nov 25, 2012, 11:37:03 PM11/25/12
to sel...@googlegroups.com, msp...@gmail.com
I'm having the same problem, the Select2 not work with the plugin ValidationEngine. Igor Vaynberg can help us with this?

Clint Worsley

unread,
Dec 20, 2012, 6:45:37 AM12/20/12
to sel...@googlegroups.com, msp...@gmail.com
I'm having the same issue.

bassam....@gmail.com

unread,
Jan 4, 2013, 2:43:22 AM1/4/13
to sel...@googlegroups.com, msp...@gmail.com
It seems validationEngine will actually ignore hidden fields unless the 'prettySelect' option is passed along. This code works:

$('#testform').validationEngine({
prettySelect: true,
usePrefix: 's2id_'
});

guillermo...@gmail.com

unread,
Jul 14, 2014, 4:42:35 PM7/14/14
to sel...@googlegroups.com, msp...@gmail.com, bassam....@gmail.com

I tried this but its not working any ideas??

adrgr...@gmail.com

unread,
Jul 31, 2014, 9:50:34 AM7/31/14
to sel...@googlegroups.com, msp...@gmail.com, bassam....@gmail.com, guillermo...@gmail.com
I solved this by the following, change in select2.js line 341:

if (this.indexOf("select2-") !== 0 && this !== 'validate[required]') {
Reply all
Reply to author
Forward
0 new messages