Whats the formula for RANGE email validation?

2 posts, 0 answers
  1. Steve
    Steve avatar
    1887 posts
    Member since:
    Dec 2008

    Posted 11 May 2018 Link to this post

    All the samples reference specific cells

    https://demos.telerik.com/kendo-ui/spreadsheet/validation

    The need is to be able to define validation for columns in the sheet to enforce a template... the data isn't being manually created with the sheet.  I feel like most of the samples (all?) seem to be setup with creating the row\cell on init, and that's valid for like template\header\footer setup but not real-world data usage.

    sheet.range("A2:A40").validation({
                    dataType: "custom",
                    from: "SEARCH(\"@\")",
                    allowNulls: true,
                    type: "warning",
                    messageTemplate: "Invalid email"
                });
  2. Ianko
    Admin
    Ianko avatar
    1940 posts

    Posted 15 May 2018 Link to this post

    Hello Steve,

    The SEARCH will not work for email validation. You can use NOT(ISERROR(FIND("@", A1)). Here you are a dojo example: https://dojo.telerik.com/ImuMuzur

    In ranges, only one cell is needed in the formula—the first one in the range. The same will be automatically iterated. You can also validate that by examining the outputed formula in Data -> Data validation.

    Regards,
    Ianko
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top