Angular Validation Issue

2 posts, 0 answers
  1. Elliot
    Elliot avatar
    59 posts
    Member since:
    May 2012

    Posted 10 Sep 2015 Link to this post

    I have the following MaskedTextBox:

    <input kendo-masked-text-box id="phoneNumber" name="phoneNumber" ng-model="item.phoneNumber" k-mask="'(999) 000-0000'" />​

    If I enter (555) 555 it doesnt mark it as invalid.  How do I ensure it is only valid if all digits are entered?

  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 14 Sep 2015 Link to this post

    Hello Elliot,

    I would suggest you define a custom validation rule, that will check whether the entered value is valid or not. You can find more details about custom validation rules here: Basically, you can check whether the value of the input contains "_" character or the raw value is less then the expected one.

    The widget does not have built-in way to validate (and show error message) if the entered value is not full.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top