I use the validation attribute on the fields of a class and has a requirement like that:
if field 'a' is validate succeed then process the validation of field 'b' but if the field 'a' is not throw validation , ignore the validation of field 'b'.
does it feasible or i should think in other way?
public class myclass
{
[required]
public string a{get;set;}
[required]
public string b{get;set;]
}
i want: 1.if a pass the validate, then execute b 's validate 2.if a not pass the validate , then don't execute the b 's validate