Validating against a model when not saving to it
I am creating a very simple site that asks for a few bits of information, does a quick calculation, and then presents it back to the user. There are multiple input fields that reference a model but nothing is actually saved to it. The model is there to ensure that the input is valid, that's it. Problem is, while I have autocomplete working, the user is still able to enter invalid (data not in model) values into those inputs. What is the best way to prevent that and implement a validation?
Edit: ASP MVC on Core 2.1
0 comments:
Post a Comment