I have a text boxes for save and text boxes for search, but I want when user click on save to check the validation for specific text boxes not all. ( exactly like Validation Group in Web Forms )
By the way, my view is strongly type view, and I have textbox for search > Name, also in save section I have textbox for Name. But when user click on search to check just the textbox on search section...etc
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
49 Points
121 Posts
validation Group MVC
Mar 12, 2019 12:28 PM|Khalid Salameh|LINK
Hello,
I have a text boxes for save and text boxes for search, but I want when user click on save to check the validation for specific text boxes not all. ( exactly like Validation Group in Web Forms )
By the way, my view is strongly type view, and I have textbox for search > Name, also in save section I have textbox for Name. But when user click on search to check just the textbox on search section...etc
Participant
850 Points
493 Posts
Re: validation Group MVC
Mar 12, 2019 12:44 PM|AddWeb Solution|LINK
The easiest thing to do is to put them in two different forms. So the input for productID goes in form1and the rest go in form2
I Used same When I need to do. i refer this link.
Contributor
3710 Points
1431 Posts
Re: validation Group MVC
Mar 13, 2019 10:03 AM|Yuki Tao|LINK
Hi Khalid Salameh,
Do you want that when click submit button,verifying only a subset of the fields?
If so,I suggest you could use JQuery validate plugin, and create custom validation.
If that is the case, I suggest you could refer to the following code:
You could refer to the following articles:
https://jqueryvalidation.org/
http://www.websitecodetutorials.com/code/jquery-plugins/jquery-validation.php
Best Regards.
Yuki Tao
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
49 Points
121 Posts
Re: validation Group MVC
Mar 14, 2019 11:17 AM|Khalid Salameh|LINK
Thanks, it is easiest way