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

any option to disable the mask getting stored in the model?

1 Answer 71 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Wilco
Top achievements
Rank 1
Wilco asked on 04 Jun 2015, 01:17 PM

Hi,

We value the clearOnPromt and unmaskonPost much but it does not provide a simple solution for validating data before posting it. Is there any option to disable the mask getting stored in the model if you haven't completely filled in the textbox? (the _ character).

Its getting ugly without this option, I have multiple masked textboxes where the user don't have to fill in the mask completely but where i use the data to validate before posting. i.e. iban, swift and zip codes. I have to deal multiple times with the mask now.

Thx!

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 08 Jun 2015, 08:53 AM
Hello Wilco,

The unmaskOnPost option works only when the widget is posted with a regular Html FORM element. In this case, the MVVM value binding uses the value method of the widget, which returns the input value.
If you would like to bind the model to the raw value of the widget, then you will need to use custom MVVM binding, as it is shown in this how-to demo:
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
Wilco
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or