FluentValidation

2 posts, 0 answers
  1. Todd
    Todd avatar
    1 posts
    Member since:
    Sep 2013

    Posted 03 Mar 2014 Link to this post

    Hi,

    Is it possible to implement FluentValidation in my DataAccess Web API 2 project?  Or is there a telerik counter part that would work better.  I'm trying to implement code-only rules in addition to my code-only mappings/associations.

    Thanks in advance,
    Todd
  2. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 06 Mar 2014 Link to this post

    Hello Todd,

    If you want to implement client-side or server-side validation, you can use the Data Annotation Attributes that can be created by the CodeGeneration wizard. Using the Data Annotation Attributes you can specify if the property is Required, it is Key or the string length. You can refer to this article how to generate Data Annotation Attributes.

    You can also take a look at the Telerik Data Access SamplesKit and the sample Ajax With Data Annotations which demonstrates an ASP.NET MVC application with client and server side validation using the Data Annotation Extensions over a code-first approach data model generated by the Telerik Data Access.

    I hope that helps. If you want to achieve something different or If any other questions arise, do not hesitate to contact us again.

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