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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -