I am using MVC3. I want to add a custom checking in client side when submitting the page..But doing so the default validation is not working...
@using (Html.BeginForm())
{
@Html.TextBoxFor(model => model.Title, new { maxlength = 250 , style = "width:450px;" })
@Html.ValidationMessageFor(model => model.Title)
<input type="submit" value="Submit" id="submit"/>
}
When i click the submit button I write a validation below
$('#submit').click(function () {/*code for validation*/ if not satisfied then return false; else return true; }
This is working fine.In case of return false , the default validation provided by model is not working
ie. @Html.ValidationMessageFor(model => model.Title)
this code is not working[Error message not showing].How to validate the default validation when click the button?