Hi,
Newbie here ![]()
Apparently the number type only accepts positive numbers.
How can I create a field that accepts negative numbers?
(It would also be nice if the number field could have a max and a min value associated with it.)
Thanks
Hi,
Newbie here ![]()
Apparently the number type only accepts positive numbers.
How can I create a field that accepts negative numbers?
(It would also be nice if the number field could have a max and a min value associated with it.)
Thanks
Just after I typed the question, I found the answer:
longitude:
label: Longitude
step: .0000001
validate:
min: -100
max: 100
- number
It does accept negative numbers, but you need to tell it to do so (the default minimum is 0):
fields:
price:
label: Price
type: number
min: -10
max: 10
I will add this information to the documentation. Thanks!
Edit: Your code should also work, but the “official” solution is the one I posted. When just using the validation, the attribute on the input field won’t get set, which means that the up/down buttons in the browser won’t work.
Great Lukas, thank you 