Server Side: 

1. Model:

[Required(ErrorMessage = "It's Required")]
[MinLength(2,ErrorMessage = "Name should longer than 2")]
public string UserName { get; set; }

2. View : 

<p>
@Html.Label("UserName")
@Html.Editor("UserName")
@Html.ValidationMessage("UserName")
</p>

If you want it show in client side: 

1. add below to web.config.

<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />

2. include the Jquery file manually: 

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
<script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.js"></script>