New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parseXYZ
options
#24
Comments
I like more the solution with the data argument. The only problem with this would be to explain it properly in the README file without adding too much text/confusion to the plate. |
I reckon the data arguments should be used to override the form's general options. I.e. correlating |
That makes sense. I'll think about it and add an update sometime soon. |
Got tests added and a beginning of a solution with my Will look at it more tomorrow. |
To solve this problem, I implemented Now you can specify a For the example input, the problem could be solved by appending <input type="text" name="Numeric -2.25:number" value="-2.25" />` |
Mate, you should really do the |
I like the idea of <input type="hidden" name="flags:array" value="[]"> However, I get a bad taste of changing the Should be more like: <input type="hidden" name="flags" value="[]" data-type="array"> |
Yes I know. When I started implementing the "data-type" stuff I realized that it was going to complicate the code a great deal. It would mean that the plugin would no longer use I would not like to compromise the simple case of using Then, I had the idea of "polluting" the name format, because that can still be used with |
I don't like that the
parseNumbers
option automagically parses everything that looks like a number to numbers, it gets confusing as the backend receiving the data can be type sensitive and won't like to receive a number for a string field, just because you inputted something that looks like a number in a string field. I have the same issue withparseBooleans
/parseNulls
.Possible alternatives:
having a
data
attribute on inputs, i.e.passing an Array of the names you want to parse as numbers, i.e.
What do you think? Either solution could be added with backwards compatibility.
The text was updated successfully, but these errors were encountered: