Validate mask on Post

3 posts, 0 answers
  1. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 11 Jun 2015 Link to this post

    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. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 15 Jun 2015 Link to this post

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Derek
    Derek avatar
    104 posts
    Member since:
    Aug 2008

    Posted 15 Jun 2015 in reply to Georgi Krustev Link to this post

    cool

    thank you

Back to Top