I'd like a way to both show an asterisk by an invalid field and show a verbose message in a validation summary. However, setting Display to "NONE" in the validation control suppresses any message that would appear next to the field to validate.
Is there a way to get this kind of hybrid function?
Yes.
Set the text property to "*" and the ErrorMessage property to the actual error message. Something like.
<asp:RequiredFieldValidator id="ValidateMyField" runat="server" text="*"
errormessage="Hey, you must really specify something"
controltovalidate="YourControl" />
For the display you can use display="Dynamic" to have the * only take up space on an actual error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With