Disabled insert in the maskedtextbox, but not disabled validator.

2 posts, 0 answers
  1. Federico
    Federico avatar
    28 posts
    Member since:
    Sep 2017

    Posted 26 Sep Link to this post

    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>

     

  2. Stefan
    Admin
    Stefan avatar
    1368 posts

    Posted 28 Sep Link to this post

    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.
Back to Top