Quantcast
Channel: How to control mutilpe validators on one property?
Viewing all articles
Browse latest Browse all 12

How to control mutilpe validators on one property?

0
0

Suppose I have apply 2 validator on one property in meta data class like:

 [RegularExpression("[0-9][0-9][0-9]", ErrorMessage = "Must be 3 digitals.")]
 [CustomValidation(typeof(MyValidator), "MyValidator")]
 public string MyField { getset; }

When user inputs data, there are some question:

1. If two validations falied, SL application only display one error message. How to decide which should be display?

2. If two validations falied, how to display all error message?

3. Is it possible to control validator one by one like: only one passed, the do next?



Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles





Latest Images