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
For a project I'm working on, I need to be able to accept floating point numbers in one of my forms. Currently, when I try to input a floating point number in one of my fields that has the following schema:
{type: 'number',required: true,model: 'sample_thickness',label: 'Sample Thickness',hint: 'The thickness of the sample in mm',default: null,}
I receive an error from Chrome when submitting:
I don't currently have a v-on:click="submit" attribute on my button, which is the main reason that Chrome is intervening in the first place, however I feel that the fields should still accept floating point values.
One easy way to support floating point values is to use HTML5's step attribute on <input type="number"></input> tags. Setting step="0.1" causes the up/down buttons on the field to increase/decrease the number by 0.1. Additionally, setting it to step="any" causes any number to be accepted.
Where the schema currently accepts a max and min parameter, it could also accept an any parameter.
The text was updated successfully, but these errors were encountered:
For a project I'm working on, I need to be able to accept floating point numbers in one of my forms. Currently, when I try to input a floating point number in one of my fields that has the following schema:
I receive an error from Chrome when submitting:
I don't currently have a
v-on:click="submit"
attribute on my button, which is the main reason that Chrome is intervening in the first place, however I feel that the fields should still accept floating point values.One easy way to support floating point values is to use HTML5's
step
attribute on<input type="number"></input>
tags. Settingstep="0.1"
causes the up/down buttons on the field to increase/decrease the number by 0.1. Additionally, setting it tostep="any"
causes any number to be accepted.Where the schema currently accepts a
max
andmin
parameter, it could also accept anany
parameter.The text was updated successfully, but these errors were encountered: