Hey all. I'm currently prototyping a simple ordering page, for which I'm using Astro with SolidJS. I've followed the steps on the related guide (https://docs.astro.build/en/recipes/build-forms-api/) and have so far been successful in setting up the frontend page and the API. But now I'm stuck at validating the input data, because I cannot figure out how to efficiently get the FormDataEntryValues converted to regular strings and especially integers. String operations (simple regex matching and the like) seem to work with these objects, but arithmetic operations wont work because, well, they're not numbers!
I've tried numerous approaches from regular google and ChatGPT, but every solution I find either wont work or seems unnecessarily hacky. Surely theres a swift and easy way to achieve this??
I'll paste my current code in the next message for reference, and thank every reader in advance for their time!