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

Angular Validation Issue

1 Answer 138 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Elliot
Top achievements
Rank 1
Elliot asked on 10 Sep 2015, 10:06 PM

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?

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 14 Sep 2015, 08:55 AM
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.

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