macek/jquery-serialize-object

dot notation ignored

antonioaltamura opened this issue · 1 comments

Hi,
thanks a lot for your plugin, I mean it.
I just tried to name an input field "reg.number".
I was expecting the same result as "reg[number]"
But the plugin totally ignore that field!

macek commented

Please see #4. Dot notation functionality is also backed by a unit test. And it's covered in the README ...

Quick recap

$.extend(FormSerializer.patterns, {
  validate: /^[a-z][a-z0-9_]*(?:\.[a-z0-9_]+)*(?:\[\])?$/i
});

var data = $('#form').serializeObject();