I am not able to replicate this behaviour.
For me as I remove the validation code in Model, there is no validation at client side too for that property.
To verify it quickly, I downloaded code from
A Beginner's Tutorial on Validating Model Data and Unobtrusive Client side Validation in ASP.NET MVC[
^]
I first ran the code as it is and verified that validation on FirstName is working. Then I removed annotations on FirstName as given below from ContactMetaData class:
class ContactMetaData
{
public string FirstName { get; set; }
[Required(ErrorMessage = "Last Name is required")]
[StringLength(50, ErrorMessage = "Last Name length Should be less than 50")]
public string LastName { get; set; }
[Required(ErrorMessage = "Address is required")]
[StringLength(100, ErrorMessage = "Address length Should be less than 100")]
public string Address { get; set; }
.
.
.
.
}
After that as I rebuild the app...there was no validation in browser side too. I looked into html too and found that validation tags were removed for "FirstName":
<form action="/Contact/Create" method="post"> <fieldset>
<legend>Contact</legend>
<div class="editor-label">
<label for="FirstName">FirstName</label>
</div>
<div class="editor-field">
<input class="text-box single-line" id="FirstName" name="FirstName" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="FirstName" data-valmsg-replace="true"></span>
</div>
.
.
.
</fieldset>
You may be getting it due to browser cache ...or may be something else.
Please consider to do rebuild and clear browser cache one more time and let me know your result. You can also try above steps I have taken to verify and update your results too.
There is a good article explaining internals here:
http://rachelappel.com/asp-net-mvc/how-data-annotations-for-asp-net-mvc-validation-work/[
^]
Thanks.