Skip to content

Version 1.0

Latest
Compare
Choose a tag to compare
@duboisp duboisp released this 23 Aug 19:08
· 3 commits to master since this release
1905085

To concatenate the server errors with the client errors (form validation WET plugin), add the following attributes to each ASP validator:

Display="Dynamic" EnableClientScript="false" data-element-id="ContentPlaceHolderID_ControlInputID" CssClass="label label-danger wb-server-error"

Example:

<asp:CustomValidator ID="TypeOfPrestationCv" ErrorMessage = "Your server error message" ControlToValidate="TypeOfPrestation" OnServerValidate="TypeOfPrestationCvServer" data-fieldname-id="<%#TypeOfPrestationLbl.Text%>"
Display="Dynamic" EnableClientScript="false" data-element-id="MainContent_TypeOfPrestation" Cssclass="label label-danger wb-server-error" runat="server"></asp:CustomValidator>
<asp:RequiredFieldValidator ID="TypeOfPrestationRfv" ErrorMessage = "Your server error message" ControlToValidate="TypeOfPrestation" Enabled="<%#Page.IsPostBack%>" data-fieldname-id="<%#TypeOfPrestationLbl.Text%>"
Display="Dynamic" EnableClientScript="false" data-element-id="MainContent_TypeOfPrestation" CssClass="label label-danger wb-server-error" runat="server"></asp:RequiredFieldValidator>

Instruction: http://wet-boew.github.io/wet-boew/docs/ref/formvalid/formvalid-en.html#MergeSCE