Permit to validate only selected objects binded with [BindProperty] for use with different forms in a single RazorPage
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
How is well described in this question https://stackoverflow.com/questions/48516547/how-to-implement-two-forms-with-separate-bindproperties-in-razor-pages would be useful to be able to have different input models with different bindings for each form in a single RazorPage.
Currently `ModelState` property validate all models together, but for each form is desirable that only related model is validated. Otherwise having others unmanaged models will lead to have `ModelState.IsValid == false` for each request asking for validation.
### Is your feature request related to a problem? Please describe.
I'm trying to validate only selected binded models when I execute a query on a RazorPage having different forms and different binded models.
### Describe the solution you'd like
I'd like to have a simple way for validate only selected models, something like `ModelState.IsValid(MyBindedProperty)`.
Contributor guide
Assessment
This issue has not been assessed yet.