redgeoff / mson

🏗️MSON Lang: Generate an app from JSON
Apache License 2.0
471 stars 33 forks source link

Form Builder - IntegerField min and max are exported as strings and not integers #852

Open mike-lerch opened 1 year ago

mike-lerch commented 1 year ago

The MSON Demo Form Builder exports integer fields like this:

                        {
                            "name": "test",
                            "label": "test",
                            "minValue": "1",
                            "maxValue": "60",
                            "component": "IntegerField"
                        }

Note that minValue and maxValue are strings and not integers. This can cause some confusing results if this is used as-is because integers will be compared to strings with unexpected validation errors.

It should produce output like this:

                        {
                            "name": "test",
                            "label": "test",
                            "minValue": 1,
                            "maxValue": 60,
                            "component": "IntegerField"
                        }