blazeworx / flagstrap

A lightwieght jQuery plugin for creating Bootstrap 3 compatible country select boxes with flags
http://blazeworx.github.io/flagstrap
MIT License
88 stars 62 forks source link

I have got an issue when use this library with jquery validation #33

Closed udaraz closed 6 years ago

udaraz commented 6 years ago

I tried to validate the select input with jquery validation plugin, but I can't validate it.

udaraz commented 6 years ago

I have fixed it by replacing these lines

line 301

$container.addClass('flagstrap') .append(buildHtmlSelect) .before(buildDropDownButton) .after(buildDropDownButtonItemList);

line 315

// Hide the actual HTML select $('select[id^=flagstrap-] option[value=""]').attr("selected","selected"); $(htmlSelect).addClass('hidden-select');

css class

.hidden-select{ border: 0 !important; clip: rect(0 0 0 0) !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; }