Generally, you will want to store the exact input in the model (as a string). When you want to display an error message (perhaps on field blur, or maybe only when submitting the form), you would run a validation function that returns Result Float ValidationError
or a type like that.
I’ve used hecrj/composable-form in the past, which does a great job of abstracting a lot of this (although it might be a bit complex for a small project).