Requirefield validator in ASP MVC:Client side or server side

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Requirefield validator in ASP MVC:Client side or server side



I have implemented a Required field validator in the Model class and also the following configuration given in web.config.


web.config


<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />



But still, the Required field validator only invokes when the submit button is clicked. So, is the require field validator server side only?



How would I run it on the client side without passing back the page?





<add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" />
– jyoti mittal
3 hours ago





Can you provide your code until now? See How to create a Minimal, Complete, and Verifiable example
– Felipe Augusto
2 hours ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to scale/resize CVPixelBufferRef in objective C, iOS

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

openssl aes gcm encryption with authentication TAG; command line