Multiple validation messages for a single cell

2 posts, 0 answers
  1. Brian
    Brian avatar
    5 posts
    Member since:
    Feb 2018

    Posted 14 Mar 2018 Link to this post

    Is there any way to have multiple validations for a single cell?  I know expressions can be combined using regex or the validation.from or validation.to properties, but that means the validation messages need to be combined, and as far as I can tell, there's no way to add formatting to the validation.messageTemplate property since it only accepts a string (no HTML, no line breaks or tabs - \n\t).

    For example, if I want to add validation to a cell that has a max length and restricts certain special characters, I would want to have:

    • 2 separate validations each with their own messageTemplate, OR
    • 1 validation with a messageTemplate that can be formatted

    The only option I have now is a single message that must be written in a single line of text.  For complex validations, these message can end up being verbose and confusing.

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    1201 posts

    Posted 16 Mar 2018 Link to this post

    Hello Brian,

    I am afraid that currently, the Spreadsheet does not offer the possibility to configure two separate validations for a single cell. Also, the cell validation could non accept conditional and / or templated messages. If you think that such feature will add value to the widget, I would suggest you to log your idea as a feature request on our Feedback portal. Based on the support it receives from the community, we will decide on whether to proceed with its implementation or not.

    Regards,
    Veselin Tsvetanov
    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