I’m working with MVC3. I have a problem when validate on client. When I focus on some input field and click submit, form will validate and show message. However, some other fields don’t. It just validate for itself,It capture onblur event when i click submit and ignore submit event(which handle valid() for this form) not for all fields in this form. I don’t know the reason(btw, i’m using telerik)
And my solution is: set onfocusout to false to make submit button work and validate for my form.( actually, I have no change to call $('form').valid(), onblur of the fields run before any event.) After submit, i want to change setdefault to true in order to validate realtime when user lose focus on a field.
So, my question is. There is any solution for me in this situation. If not, How can i reset default validator onfocusout.
Thanks in advance.
Adding information: If I remove all of the CSS, it works fine. What is the problem?
<link href="../../Assets/Css/Default.css" rel="stylesheet" type="text/css" />
<link href="../../Assets/Css/MenuStyle.css" rel="stylesheet" type="text/css" />
<link href="../../Assets/Css/ui-base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<link href="../../Assets/Css/telerik.vista.min.css" rel="stylesheet" type="text/css" />
<link href="../../Assets/Css/telerik.common.min.css" rel="stylesheet" type="text/css" />
<link href="../../Assets/Css/Custom.css" rel="stylesheet" type="text/css" />
<link href="../../Content/telerik-extensions.css" rel="stylesheet" type="text/css" />
Thanks, I find out the problem is My css class makes error place to show message too narrow. Error messages show in mutiline. When I click submit button, focusout event is fired and show error which make my submit button move out of it’s position and click event won’t be executed.