html5 - jQuery Mobile Validation in Asp.Net MVC5 -


i'm creating jquery mobile based asp.net mvc 5 application utilizing jquery validation. ealier validation working fine stopped working suddenly. unable find reason.

here sample of code in use:

model:

        [displayname("select file(s) upload")]         [required(errormessage = "select atleast 1 file")]         public httppostedfilebase file { get; set; }         [required]         [stringlength(250, minimumlength = 3)]         public string comments { get; set; } 

view:

    <div class="form-group">         @html.labelfor(model => model.file, new { @class = "control-label col-md-2" })         <div class="col-md-10">             @html.textboxfor(model => model.file, new { type = "file"})             @html.validationmessagefor(model => model.file)         </div>     </div>     <br /> <div class="form-group">     @html.labelfor(model => model.comments, new { @class = "control-label col-md-2" })     <div class="col-md-10">         @html.textareafor(model => model.comments)         @html.validationmessagefor(model => model.comments)     </div> </div> 

jquery files in generated html

<script src="/scripts/jquery-1.8.2.js"></script> <script src="/scripts/jquery.mobile-1.2.0.js"></script>   <script src="/scripts/jquery.unobtrusive-ajax.js"></script> <script src="/scripts/jquery.validate.js"></script> <script src="/scripts/jquery.validate.unobtrusive.js"></script> 

whenever submit form go controller instead of performing client side validation , showing error messages. why?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -