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

Disabled insert in the maskedtextbox, but not disabled validator.

1 Answer 271 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 26 Sep 2017, 10:13 AM

I would disable value insertion in the MaskedTextBox, but keep the validator for that field.

I use kendo with MVVM.

This is my html code:

<div>
   <label for="elem" class="elem">Field</label>
   <input data-role="maskedtextbox" data-bind="value: elem1" id="elem" name="element" class="form-control" placeholder="Insert" required validationMessage="Insert {0}" disabled/>
<span class="k-invalid-msg" data-for="element"></span>
</div>

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 Sep 2017, 06:39 AM
Hello, Federico,

Validation custom rules can be achieved only with custom validation, as by design an input which is disabled or read-only is not validated.

More information can be found in the following forum thread:

http://docs.telerik.com/kendo-ui/api/javascript/ui/validator#defining-custom-messages

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MaskedTextBox
Asked by
Federico
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or