I've got a mysterious problem with jQuery validation on the client side. I've got this piece of code which works in an extern js-file fine - but inline it doesn't work:
<script type="text/javascript">
$(document).delegate('#RegisterForm', 'submit', function () {
$('#ErrorsUl').empty();
if ($('#MyString').val() == "") {
$('#ErrorsUl').append('<li>@MvcTest.Resources.Views.Home.Strings.MyString</li>');
$('#Errors').show();
return false;
}
});
</script>
In my view I also use the standard validation of the framework. My theory is that this standard validation crashes my own validation - is that possible? When yes, how can I work around this?
My problem is, that I've to use this crap of code inline because of my resource string, which isn't accessible in extern js-file. :(