Input not accepting a decimal

Mission: SERVERLESS 101
Task: Invoke the API Service using generated client SDK

Please, describe your problem here.
I’m trying to test the price input to be 1.99, but when previewing the application, the Price input with the number validation is not allowing decimals. I can only type whole numbers.

When the input is set to Number, it will allow only 0-9 values. For decimal values, use String and add logic to parse it to a number.

Got it, the video doesn’t mention that (here’s where the direction is just to select the number validation), so may be worth adding that somewhere in the mission. What’s the best way to add the logic? I see a “convert to number” block but not sure how to best implement it.

Thanks for the quick reply!

Hi Ethan,

I just rewatched the video (thank you for pointing it out). It must be a regression; clearly, the input field used to be able to process decimal values. I see that it can’t now. I will open an internal ticket to fix that behavior.

From the perspective of validating that particular task, I think the actual value you use for the price is not important.

Regards,
Mark

Ok, great. From your initial response, it sounded like that was expected behavior and it wouldn’t be fixed, so I wanted to make sure I knew how to accept decimals properly in a live app. But if it’s on the docket for fixing, then that’s even better :slight_smile:

Thanks again!