Implementing Validation Rules with OpenAccess

11 posts, 0 answers
  1. shawn reagan
    shawn reagan avatar
    14 posts
    Member since:
    Feb 2010

    Posted 22 Jul 2010 Link to this post

    I was just seeing what is the recommended practice for enforcing validation rules when using OpenAccess classes?  Should I use Enterprise Library or is there an easier implementation?

    i.e.:  Person object.
    FirstName - Required... MaxLength 20
    DateOfBirth - Can't be in the future
    etc...
    Thank you.
  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 26 Jul 2010 Link to this post

    Hi shawn reagan,

    Currently the Validation Application Block from the Enterprise Library seems like a decent choice.
    You must have in mind that inserting attributes on properties in the code generated by OpenAccess is not supported out of the box currently. In order to do this, you will have to change the code generation templates.

    For the Q3 2010 release of OpenAccess we have planned to implement functionality in the visual designer that will allow defining attributes on properties of persistent classes, that will be used in the generated code.

    However if you are using the Validation Application Block there are two ways to define your validation rules without using attributes:
    1. create validation rules by configuring the respective validator objects using code
    2. storing the validation rules configuration in the application configuration file

    I hope this helps.

    Best wishes,
    Jordan
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Mitch Wagers
    Mitch Wagers avatar
    5 posts
    Member since:
    Jun 2010

    Posted 06 Dec 2010 Link to this post

    Do you have an example of this with Q3 2010?
  5. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 09 Dec 2010 Link to this post

    Hi Mitch Wagers,

    Unfortunately the attribute definition functionality for the visual designer had to be cut off the Q3 2010 release of OpenAccess.
    This functionality is still on our TODO list and we will be working on it for the Q1 2011 release of OpenAccess.
    As always, any feedback that you may have is welcome.

    All the best,
    Jordan
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  6. Muhammad
    Muhammad avatar
    1 posts
    Member since:
    Apr 2011

    Posted 11 May 2011 Link to this post

    any update on the " attribute definition functionality for the visual designer" ???
  7. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 13 May 2011 Link to this post

    Hello Mitch Wagers,

    I regret to inform you  that the attribute definition functionality for the visual designer did not make it into the Q1 2011 release of OpenAccess. Unfortunately I cannot give you a t the moment a time frame when this functionality will be implemented.

    Greetings,
    Jordan
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  8. Sebastian
    Sebastian avatar
    3 posts
    Member since:
    Sep 2010

    Posted 09 Jan 2012 Link to this post

    any update on Implementing Validation Rules with OpenAccess
  9. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 12 Jan 2012 Link to this post

    Hi Sebastian,

    The validation rules have not yet been implemented due to their lower relative priority in comparison to other features. We have opened a Public Issue Tracking System entry where you can track the progress of the feature and more importantly - vote for the implementation.

    As visible in the entry, we are thinking about adding Data Annotations support for this purpose, but we would like to get some feedback first to be sure that it is valuable for many people.

    We appreciate any opinions or remarks for that matter.

    All the best,
    Ivailo
    the Telerik team

    SP1 for Q3’11 of Telerik OpenAccess ORM is available for download

  10. Craig
    Craig avatar
    112 posts
    Member since:
    Nov 2011

    Posted 14 Feb 2014 Link to this post

    Hi
    Has this feature been implemented in Data Access (Q3 2013 SP1)?

    The issue tracking entry link seems to be broken.

    Thanks
    Craig
  11. Craig
    Craig avatar
    112 posts
    Member since:
    Nov 2011

    Posted 14 Feb 2014 in reply to Craig Link to this post

    I've just found out about IDataErrorInfo which I'm looking into. 
    Here's a link How to: Implement the IDataErrorInfo Interface

  12. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 14 Feb 2014 Link to this post

    Hello Craig,

    You are on the right track. Indeed, some level of validation capabilities were implemented as part of our code generation settings in the Model Settings dialog, namely the Data Annotation attributes, INotifyPropertyChanged and IDataErrorInfo approaches. Therefore, when the deprecated PITS system was brought down and the new feedback portal has been introduced, we have not migrated the item you are probably looking for.

    Do not hesitate to let us know if you experience any issues with the current validation options. If you have any new feature requests, I would encourage you to post in the feedback portal, where it will get exposure to our community and potentially votes for it's implementation priority.


    Regards,
    Ivailo
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top
DevCraft banner