You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering what your thoughts were on adding a parameter to RazorEngine.renderView to pass in a ModelStateDictionary option. I understand that you don't want to expose a lot of attribute-based validation in Giraffe (per this discussion), so that's why I'm suggesting only adding the parameter to renderView and not to the handlers (also, it's less likely to break most existing users of the library if the change isn't to the http handlers).
I'm not a Razor expert, to be clear; I was converting an existing C# example (this) to F# w/ Giraffe.Razor to learn and ran in to this issue. I bumped in to this is because I was trying to use Microsoft.AspNetCore.Mvc.TagHelpers, specifically asp-validation-summary, to reuse the same view while providing form validation feedback to the user in the Login view.
I can create a PR if you're okay with adding this parameter to RazorEngine.renderView, but it would be a breaking change.
Edit: Currently, an empty ModelStateDictionary is created here.
The text was updated successfully, but these errors were encountered:
I think wanting to pass in a ModelStateDictionary is probably a reasonable change, because it is an integral part of the Razor experience, so I'm happy with this change.
Feel free to provide a PR and we can take it from there!
Hi! Just updated the package and found this breaking change... Just wanted to suggest that idea one more time, instead of adding more and more parameters to the handler to group them into VieModel type, since with each new parameter changes will be breaking again and again...
I was wondering what your thoughts were on adding a parameter to
RazorEngine.renderView
to pass in aModelStateDictionary option
. I understand that you don't want to expose a lot of attribute-based validation in Giraffe (per this discussion), so that's why I'm suggesting only adding the parameter torenderView
and not to the handlers (also, it's less likely to break most existing users of the library if the change isn't to the http handlers).I'm not a Razor expert, to be clear; I was converting an existing C# example (this) to F# w/ Giraffe.Razor to learn and ran in to this issue. I bumped in to this is because I was trying to use
Microsoft.AspNetCore.Mvc.TagHelpers
, specificallyasp-validation-summary
, to reuse the same view while providing form validation feedback to the user in the Login view.I can create a PR if you're okay with adding this parameter to
RazorEngine.renderView
, but it would be a breaking change.Edit: Currently, an empty
ModelStateDictionary
is created here.The text was updated successfully, but these errors were encountered: