开发者

asp.net validator control issue

开发者 https://www.devze.com 2023-01-03 14:31 出处:网络
I have a validator that check an input. i what that the validator displayed \"valid\" if the value is valid,

I have a validator that check an input.

i what that the validator displayed "valid" if the value is valid, and "invalid" if the value is hasnt passed the 开发者_StackOverflowvalidation.

can i manage this without adding an addional lable for the valid state(by setting the visibility: true/false)?

does the validator control has am alternative value, or i have to override it?


No, the validators are designed to render text if there was a validation error, and to be unobtrusive if not.

Of course, you could create a new Validator inheriting from BaseValidator that would do this.

There's an article giving a good overview of how to do this.

0

精彩评论

暂无评论...
验证码 换一张
取 消