Validation doubt

Thread is closed for posting
2 posts, 0 answers
  1. Alexandre
    Alexandre avatar
    1 posts
    Member since:
    Sep 2014

    Posted 16 Jan 2016 Link to this post



    I set up all the validation that I need on my form. The issue is I have a button that a user can tap anytime, so when he taps I need to know if all the form is validated, how to do that, without validating the Business object, and repeating the validating code that I set up for the propertys.

     Just for clarification, when the user focus on field, and leave the field all the validation is working as expected, the issue is when he tries to save, how can I know that all my properties had been validated already.


    Thanks in advance

  2. Adrian
    Adrian avatar
    174 posts

    Posted 20 Jan 2016 Link to this post

    Hello, Alexandre,

    Thank you for contacting us.

    The described scenario can be achieved by iterating through the properties in the form and using the isValid property of TKEntityProperty. Please consider the code snippet below:
    BOOL isValidForm = YES;
       for (TKEntityProperty *property in {
           if (!property.isValid) {
               isValidForm = NO;

    I hope this helps. If you need further assistance, do not hesitate to contact us.

    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
Back to Top