This is a migrated thread and some comments may be shown as answers.

[Solved] Server side always hits even if client validation fails with Unobtrusive JQuery.

1 Answer 18 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
colson
Top achievements
Rank 1
colson asked on 15 Aug 2011, 02:00 PM
hi,
Per your sample, I used Unobtrusive JQuery at client side to validate error. I found out it never hit server side in your sample when validation fails in client side. Howerver, in my application server side always hits even if client validation fails.

config file:

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

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

register these script files to teleirk components.

.Add("~/Scripts/jquery-1.6.2.min.js")

.Add("~/Scripts/jquery.unobtrusive-ajax.min.js")

.Add("~/Scripts/jquery.validate.min.js")

.Add("~/Scripts/jquery.validate.unobtrusive.min.js")

Annonation MetaData:

   [MetadataType(typeof(EPRMetaData))]

   public partial class EPR { }

   public class EPRMetaData

   {

       public Int32 Id;

       [DisplayName("EPR_ID"), Required]

       [StringLength(10,ErrorMessage="Field EPR_ID can't exceed 10 characters.")]

       public String HP_EPR_ID { get; set; }

   }

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 Aug 2011, 02:45 PM
Hi Colson,

Unfortunately,  the provided information is not suffusion in order to tell what may be the cause for such behavior. Therefore, could you please provide a small sample application which demonstrates the issue you are facing.

Regards,
Rosen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Tags
General Discussions
Asked by
colson
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or