unmaskAsNumber causing jquery serialize to fail
See original GitHub issueusing this options:
{
alias: 'numeric',
groupSeparator: '.',
radixPoint: ',',
autoGroup: true,
digits: 2,
digitsOptional: false,
placeholder: '0',
unmaskAsNumber: true,
autoUnmask: true,
removeMaskOnSubmit: true
}
calling jquery.serialize will throws exception saying that replace is not a function. this is because jquery serialize assume that the fields value is string and tries to escape new line characters if any.
https://jsfiddle.net/mtsunu/8Ldejeeq/
the other issue is when setting unmaskAsNumber: false. notice i’m using comma as radixPoint. when i input 12.000,24 the serialized value is 12000,24 (i’m guessing the unmask value will be wrong too, haven’t tried it though)
what is the correct options for that situation?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
serialize() form showing internal server error - Stack Overflow
I have a form, I am using serialize() to get the values from the form and post it in ajax. But I am...
Read more >.serialize() | jQuery API Documentation
The .serialize() method creates a text string in standard URL-encoded notation ... and its children in a set will cause duplicates in the...
Read more >'serialize' WITHOUT some form elements - MSDN - Microsoft
I have a form to submit via a JQuery function. Here is the function: function SubmitForm(form) { $.validator.unobtrusive.parse(form); var ...
Read more >jQuery 1.4 $.param demystified - Ben Alman
And using jQuery's $.serialize method to convert form values into params for AJAX POST ... and attempting to do so may cause a...
Read more >Adding additional Parameter in Serialize Form Data
Hi Guys, there are situations, when you have an Html form with some data in it and you have to submit the data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mtsunu ,
An example
https://jsfiddle.net/8Ldejeeq/1/
Okay. Maybe you should put a warning on the documentation.
Thanks for the help!