❔ Contact us validation for MVC project
Hi Mates, I have prebuilt Contact Us page in Bootstrap, But I want to use this page for user contact without disturbing the page rendering. and please tell me do I have to use Model(already I have a controller for contact )
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1130163677295804466/Screenshot_68.png)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1130163677522305146/Screenshot_69.png)
9 Replies
i'd use a model and then have a
<div asp-validation-summary="ModelOnly" style="color: rgb(255, 60, 60);"></div>
at the start of ur form and <span asp-validation-for="Property" class="text-danger"></span>
for each property that u want to validate forcan you please explain a little bit more how to do this exactly @hackmagician
slap ur model in like this
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1130512504758489179/image.png)
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1130512534814859324/image.png)
then a form like this
and those spans for validation under each property u wanna validate so they lign up
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1130512629291569152/image.png)
and then slap a submit one
and as for the controller
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1130512702364725258/image.png)
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.