Closed jeremytbrun closed 5 years ago
Not sure what the browser support was like when I wrote that view in 2011! That or I hadn't heard about it.
I think it's probably not a breaking change, so if you want please update the view and send a PR. FF is an ongoing work any contributions and improvements are very welcome!
If not, you can override the view in your own project (FF checks your local views directory before reading the embedded ones).
Or you can put a Regex validation attribute on it to allow only integer characters.
On Fri, 1 Mar 2019, 19:45 Jeremy Brun, notifications@github.com wrote:
Is there a reason why any PropertyVm's that are of type Int32 are rendered as only as an input of type 'text' according to...
Why don't these get rendered as type 'number' in HTML5? It'd make the client side validation work right out of the box to only let the user submit a numeric value.
Otherwise is there a way you'd recommend programmatically creating my PropertyVm so that client side validation works to limit it to only numeric values?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mcintyre321/FormFactory/issues/77, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ0-nQo4MB2wu-9q577Xbq5IE9sXR5rks5vSYNwgaJpZM4bZsVJ .
I've submitted a PR for this, I considered also changing double and decimal, but wasn't sure if that would be appropriate. Open to your thoughts on this.
Is there a reason why any PropertyVm's that are of type Int32 are rendered as only as an input of type 'text' according to...
https://github.com/mcintyre321/FormFactory/blob/master/FormFactory/Views/Shared/FormFactory/Property.System.Int32.cshtml
Why don't these get rendered as type 'number' in HTML5? It'd make the client side validation work right out of the box to only let the user submit a numeric value.
Otherwise is there a way you'd recommend programmatically creating my PropertyVm so that client side validation works to limit it to only numeric values?