I have a curious problem with ASP.NET MVC3 client-side validation. I have the following class:
public class Instrument : BaseObject { public int Id { get
$('#Name1').keypress(function () { if (this.value.length >= 5) return false; });