I have ASP.NET MVC webpage where I use DataAnnotation to validate forms at client side. One of the view classes have a property that looks like this :
[StringLength(100, MinimumLength = 3, ErrorMessage = "Länken måste vara mellan 3 och 100 tecken lång")]
[Display(Name = "Länk")]
[RegularExpression(@"^(http(s)?://([\w-]+.)+[\w-]+(/[\w- ./?%&=])?)?$", ErrorMessage="Länkgen är inte giltlig")]
public string Url { get; set; }
In the view I use this code for the propertie :
@Html.LabelFor(c => c.Url, true)
@Html.TextBoxFor(c => c.Url, new { @class = "tb1", @Style = "width:400px;" })
@Html.ValidationMessageFor(model => model.Url)
When pasting in a URL like this :
http://95rockfm.com/best-voicemail-giving-play-by-play-of-car-accident/
The webpage will lockup and I can´t do anything on the wepage. If I however paste this in :
http://95rockfm.com/best-voicemail-giving-play-by-play-of-car-accident
It works just fine.
These javascript file is included at the bottom of the webpage :
<script type="text/javascript" src="/Scripts/jquery.qtip.min.js"></script>
<script src="/Scripts/jquery-1.7.1.min.js"></script>
<script src="/Scripts/jquery-ui-1.8.20.min.js"></script>
<script src="/Scripts/jquery.validate.min.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.min.js"></script>
The exact same problem accures both in IE and Chrome. IE will however came back and say that a script took to long and a button to stop the script. But when switching input control the script will run again and look the webpage.
Im not using any custom stuff so why do I get this?