Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,
If I set CustomValidator for some class (the class is defined in DomainService.metadata) then validation is not async. Otherwise, if I set CustomValidator for some properties then validation is async. How can I make async validation with CustomValidator for my class?

First example:
C#
[CustomValidation(typeof(MyValidator), "IsNameAvailable")]
    public partial class MyClass {
       ...
    }


In above example there isn't async validation.

Second example (async validation):
C#
public partial class MyClass {
    [Required]
    [CustomValidation(typeof(MyValidator), "IsNameAvailable")]
    public string name { get; set; }
}


Thanks in advance!
Posted
Updated 12-Oct-11 0:38am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900