This is a migrated thread and some comments may be shown as answers.

FluentValidation

1 Answer 148 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Todd
Top achievements
Rank 1
Todd asked on 03 Mar 2014, 08:35 PM
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

1 Answer, 1 is accepted

Sort by
0
Boris Georgiev
Telerik team
answered on 06 Mar 2014, 04:35 PM
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.
Tags
Web Services
Asked by
Todd
Top achievements
Rank 1
Answers by
Boris Georgiev
Telerik team
Share this question
or