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

[Solved] Unobtrusive validation won't work with Editor

6 Answers 115 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robin
Top achievements
Rank 1
Robin asked on 26 Aug 2011, 08:30 AM
Hi,

I have a problem with unobtrusive validation and Telerik Editor. Regular textbox will validate without any problems but the editor won't validate until I post the entire form back to the server.

I've created an demo app to demonstrate my problem, see attachment.

6 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 29 Aug 2011, 10:03 AM
Hello Robin,

 
The attached project uses Q1 2011 version of the Telerik Extensions for ASP.NET MVC. In it the unobtrusive validation for the editor extension was not supported. Please use the Q2 2011 release of Telerik extensions for ASP.NET MVC.

All the best,
Georgi Krustev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Simon Holman
Top achievements
Rank 1
answered on 15 Feb 2012, 01:36 AM
I have the 2011.3.1115 version and it still not working for me.
0
Georgi Krustev
Telerik team
answered on 15 Feb 2012, 05:26 PM
Hello,

This is not a known issue and in order to proceed with the investigation I will need a test project, which replicates the problem. 

Regards,
Georgi Krustev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Simon Holman
Top achievements
Rank 1
answered on 16 Feb 2012, 11:58 AM
I don't have time to setup a test project, I've just worked around the issue for now.

I've triple checked that everything is correct as per the demo on your site and it's still not working.
0
Eric
Top achievements
Rank 1
answered on 04 Apr 2012, 08:47 PM
I'm using the Q1 2012 version of the MVC controls, and I have the same problem as well.  Is there something that needs to be done specifically to enable unobtrusive validation?  Here's a code snippet for the editor (the Html.EditorFor() works fine with the unobtrusive validation):

Update: Using EditorFor() with a strongly typed model, the DetailMessage in my example is null when I post back.  I'm not sure why, it's hard to tell if I'm doing anything wrong since nearly all of the examples have the value set in them already and are not binding to anything.

<div class="editor-label">
@Html.LabelFor(model => model.DetailMessage)
</div>
<div class="editor-field"> 
@*@Html.EditorFor(model => model.DetailMessage)*@
@Html.ValidationMessageFor(model => model.DetailMessage)
 
<br />
 
@{ Html.Telerik().EditorFor(model => model.DetailMessage)
.Name("DetailMessageEditor")
         .HtmlAttributes(new { style = "height: 200px" })
         .Encode(false)
         .Render();
}
</div>
0
Erki
Top achievements
Rank 2
answered on 01 Apr 2013, 10:54 AM
I use 2013.1.219 version and still not working.
Tags
Editor
Asked by
Robin
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Simon Holman
Top achievements
Rank 1
Eric
Top achievements
Rank 1
Erki
Top achievements
Rank 2
Share this question
or