Howdy!
I have another question about the form component. Whenever a decimal is inputed into my number field like so:

It shows up as red. Is there a way to change this?
Howdy!
I have another question about the form component. Whenever a decimal is inputed into my number field like so:

It shows up as red. Is there a way to change this?
My first guess would be to change the period with a comma, due to e.g. regional settings.
Looking at the documentation of the form component, my second guess is the constraints not allowing you to input anything other than a number, like in the documentation example:
![]()
Thanks for the reply!
When I have the type set to number, I can’t even input a comma into the field. I looked at the documentation, and tried to set my own validation pattern in the constraint property by changing the type to text and changing the regex pattern to this:
```
/^[+-]?\d+(\.\d+)?$/
But when I enter anything into the input field it doesn’t even seem to check the validation pattern and lets anything go through. Kinda at a loss at what to do next.
Edit: Just after i posted, you say the red outline occurs when inputting a decimal. Is it possible the field is set as an integer and for that reason doesn’t accept decimals? If you could set this as a float, should accept decimals.
That is curious indeed. Just to be sure, were the two property values above the pattern enabled? These should be “validation.constraints.required.enabled” and “validation.constraints.pattern.enabled”.
Secondly, in the property editor, does the text property show an error there? This should be indicated by a small red warning sign all the way on the right end of the property row. If so, this error might indicate what the issue is.
Thirdly, in my mind the outline turns red because the input is causing an error on the component. Is there any chance the red outline is a style, and I’m trying to tackle something that isn’t an error?
Have you tried using the submit button in preview mode and seeing whether it lets you submit a form at all? Or maybe, a pop-up with an error message shows up?