Validate only if the input field as data

2 posts, 0 answers
  1. Philip
    Philip avatar
    8 posts
    Member since:
    Mar 2017

    Posted 22 Mar 2017 Link to this post

    We want to validate only if the user has inputed any data into a form field. So basically no fields are required, but if for some reason they filled out the email address field we want to make sure it a valid address.

    How would we use the Validator in this use case in an MVVM pattern.

    Thanks in advance

  2. Alex Hajigeorgieva
    Alex Hajigeorgieva avatar
    1082 posts

    Posted 24 Mar 2017 Link to this post

    Hi Philip,

    You can use the Kendo UI Validator with a custom rule. I have modified the official demo of the validator to show you:

    Additionally, since you are using MVVM, you may find the below how-to article useful as well:

    Kind Regards,
    Alex Hajigeorgieva
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 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