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

Enterprise Library Validation with RadDataForm and RadDataServiceDataSource

1 Answer 40 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Santiago
Top achievements
Rank 1
Santiago asked on 18 Dec 2012, 05:30 PM
Hello Telerik Team,

I'm trying to use the Enterprise Library Validation Block for Silverlight 5 using Metadata of the classes for specify the validation term for every property.

Here is my Code:
[Metadatatype(typeof(CustomerMetadata))]
public partial class Customer
{
 
}
 
public class CustomerMetadata
{
 
        [Required(ErrorMessage = "El nombre es requerido")]
        [StringLengthValidator(1, RangeBoundaryType.Inclusive, 2, RangeBoundaryType.Ignore, MessageTemplate = "Name is Required")]
        public string Name{
               get;
               set;
        }
 
}

Where the class Customer is the generated class from the ServiceReference (OData v2). But when I bind my RadDataServiceDataSource to the RadDataForm the validation is not performed.

The question is.. Is it possible to Use this validation approach?

Thank You for your help

1 Answer, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 21 Dec 2012, 02:00 PM
Hello Santiago,

Currently, we do not support such validation. What you can try instead is to work with DataAnnotations.
Still, I will research the case to see whether we could improve the behavior.  

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DataForm
Asked by
Santiago
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or