You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably an edge case but I have some data that is a number but needs to be treated as a string and also data that is a number but needs to remain as a number. So I do need parseNumbers: true.
example postcode=01220
.parse returns { postcode : 1220 }
Which is now invalid.What I would like is { postcode : '01220' }
Another example is telephone number
telephone=012345678
.parse returns { telephone: 12345678 } would like { telephone: '012345678' }
What would be nice is the ability to prefix the value so that it is treated as a string and the prefix stripped ?
option {parseNumbers: true, treatAsTextPrefix: '<'}
telephone=<012345678 would result in { telephone: '012345678'
Or is there some other way to achieve this?
The text was updated successfully, but these errors were encountered:
Just don't use the parseNumbers option and parse the string properties yourself. Then you have full control. I'm not gonna add a treatAsTextPrefix option.
Hi
Probably an edge case but I have some data that is a number but needs to be treated as a string and also data that is a number but needs to remain as a number. So I do need parseNumbers: true.
example postcode=01220
.parse returns { postcode : 1220 }
Which is now invalid.What I would like is { postcode : '01220' }
Another example is telephone number
telephone=012345678
.parse returns { telephone: 12345678 } would like { telephone: '012345678' }
What would be nice is the ability to prefix the value so that it is treated as a string and the prefix stripped ?
option {parseNumbers: true, treatAsTextPrefix: '<'}
telephone=<012345678 would result in { telephone: '012345678'
Or is there some other way to achieve this?
The text was updated successfully, but these errors were encountered: