RequiredFieldValidator move display style to external stylesheet

58 views Asked by At

I am validating if some fields are empty, if they are then an error message should show up. But I am also trying to set my CSP Headers and remove inline styling. Is there a way to do the dynamic display portion within an external stylesheet?

<td>
   <asp:DropDownList ID="DropDownListProductSvcCode" runat="server">
   </asp:DropDownList> <asp:RequiredFieldValidator ID="rfvProductSvcCode" runat="server" 
 ErrorMessage="<br />* Please select a product service code" 
 ControlToValidate="DropDownListProductSvcCode" CssClass="redMessage" Display="Dynamic" 
 InitialValue="" />
</td>

The display as a style triggers an inline style error out when I have my CSP style header set to self as I expected. Is there a way to move this or will a nonce or hash be required?

0

There are 0 answers