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

Textbox Validation is not working with Template

1 Answer 131 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Atul
Top achievements
Rank 1
Atul asked on 24 Jul 2014, 02:20 PM
Hi All,

I have a textbox inside template, which I want t display on Kendo Popup. Everything is working fine except Validation 

here is Template code:

  <script type="text/x-kendo-template" id="popup-template">
     <div>
   @Html.TextBoxFor(m => m.Address)
        </div>
</script>

here is html render for Textbox :
<input class="k-textbox" data-val="true" data-val-length="Address must have a length between 1 and 200 characters." data-val-length-max="200" data-val-length-min="1" data-val-regex="Address must only contain alpha-numeric characters." data-val-regex-pattern="^[A-Za-z\d]*$" id="Address" name="Address" placeholder="Type Address" type="text" value="">

Any specific reason why validation is not working here. please correct me if I am doing anything wrong.

Thanks-

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 28 Jul 2014, 07:15 AM
Hello Atul,

The code snippets does not reveal where and how the template is used, but I suspect that there is no Kendo UI Validator to handle it. Sharing related code snippets, live link, or ideally - a runnable sample project where the issue is reproduced would help us pinpoint the exact reason for this behavior and advise you further. 

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Templates
Asked by
Atul
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or