Text Validation Not working

3 posts, 1 answers
  1. Adel Chenni
    Adel Chenni avatar
    7 posts
    Member since:
    Jan 2010

    Posted 12 May Link to this post

    If you use the below - r is not passing the valid state

        $("#spreadsheet").kendoSpreadsheet();

        var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");

        var sheet = spreadsheet.activeSheet();

        sheet.range("A1").value("r");
        sheet.range("A1").validation({
            from: "r",
            comparerType: "equalTo",
            dataType: "text",
            messageTemplate: "Not Valid."
        });

  2. Answer
    Stefan
    Admin
    Stefan avatar
    264 posts

    Posted 13 May Link to this post

    Hello Adel,

    Thank you for your report. I confirm this is an issue with the present version of the Kendo UI Spreadsheet.  I have forwarded your report to our developers for fixing. In addition, I have updated your Telerik points for bringing the problem to our attention.


    Regards,
    Stefan
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    278 posts

    Posted 31 Aug Link to this post

    Hello Adel,

    I would like to update you on the current state of this case.

    As we support both formulas and references for the from and to properties, the specified values are always parsed as functions. In order parsing to successfully recognize text value, you will need to double wrap this value in quotes. Therefore, changing the validation rule in the following way should solve the issue observed:
    sheet.range("A1").validation({
        from: JSON.stringify("r"),
        comparerType: "equalTo",
        dataType: "text",
        messageTemplate: "Not valid."
    });

    Regards,
    Veselin Tsvetanov
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top