I am creating a kendo window for create and edit of my data Item. The kendo window has a form embedded within it as below.
<div kendo-window="allDevices.addNewDeviceKendoWindow" k-title="'Add'" k-width="520" k-height="520"
k-visible="false"
k-position='{left:400, top:250}'
class="titlewindow" k-on-close="allDevices.resetNewDeviceVariables()">
<div>
<form id="adddeviceform" class="form-horizontal myform" role="form" kendo-validator="myAddDeviceValidator"
autocomplete="off" k-options="formValidations" >
<ul>
<li>
<label for="ipAddress" class="control-label">IP Address</label>
<input ng-model="allDevices.newDeviceJson.ipAddress" type="text" class="form-control"
name="ipaddress" data-ipaddresscheck data-ipaddresscheck-msg="Enter Valid host IP Address"
required placeholder="Enter IP Address"/>
</li>
...
I notice that if I close the window with a validation error and then try to open the window again, the validation errors still show up.
How can I also clear the validation errors whenever I open a new window ?
<div kendo-window="allDevices.addNewDeviceKendoWindow" k-title="'Add'" k-width="520" k-height="520"
k-visible="false"
k-position='{left:400, top:250}'
class="titlewindow" k-on-close="allDevices.resetNewDeviceVariables()">
<div>
<form id="adddeviceform" class="form-horizontal myform" role="form" kendo-validator="myAddDeviceValidator"
autocomplete="off" k-options="formValidations" >
<ul>
<li>
<label for="ipAddress" class="control-label">IP Address</label>
<input ng-model="allDevices.newDeviceJson.ipAddress" type="text" class="form-control"
name="ipaddress" data-ipaddresscheck data-ipaddresscheck-msg="Enter Valid host IP Address"
required placeholder="Enter IP Address"/>
</li>
...
I notice that if I close the window with a validation error and then try to open the window again, the validation errors still show up.
How can I also clear the validation errors whenever I open a new window ?