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

Validate mask on Post

2 Answers 105 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 11 Jun 2015, 11:07 PM

I use this to validate required fields on post

        var validator = $("#caseForm").kendoValidator().data("kendoValidator");
        var isvalid = validator.validate();
 
        if (isvalid) {
post..
}
 

and it works fine if field is required but if its a mask with wrong entry it doesnt work.

Do you have some sample where the mask is checked on post?

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 15 Jun 2015, 02:46 PM
Hello Derek,

When "required" validation is initiated, the validation rule will check whether the input element has any value in it. If you would like to validate whether the entered value is a valid mask then you will need to run a custom validation rule: You can check whether the maskedtextbox value is invalid and trigger special error message for it.

Let me know if something is not clear.

Regards,
Georgi Krustev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Derek
Top achievements
Rank 1
answered on 15 Jun 2015, 02:55 PM

cool

thank you

Tags
MaskedTextBox
Asked by
Derek
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Derek
Top achievements
Rank 1
Share this question
or