asp.net mvc - my pro just shows client side validation errors -


i use @html.validationmessage("username") check duplicate username. , working. when have serverside validation error & clientside validation error , shows clientside error .i wanna both errors can appear.

@html.validationmessage("username") alone works , when have forexample email required error , @html.validationmessage("username") doesn't show , email error shows.

   //client    @html.textboxfor(m => m.email, new { @class = "group", @placeholder = "*  enter email" })    @html.validationmessagefor(model => model.email)     //server     @html.validationmessage("username")     @html.textboxfor(m => m.username, new {@id="group" , @class = "input-block-level", @placeholder = "* enter username" }) 

this expected behavior client-side validation: prevents form post on error, because can determine input invalid.

if don't want client-side validation run, can disable , rely on corresponding server-side validation generate same error message (assuming validating server-side, should be).


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -