November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
What you'd need to do is hook the ControlCreated event of the XFormControl, then iterate through the controls collection. When you find an IValidator control, you need to set a custom message in the ErrorMessage property.
See http://www.frederikvig.com/2010/11/semantic-markup-with-episerver-xforms/ for an example.
Thanks, IValidator is adding the custom error message.
But I am trying to display the error message from my xml.
<email>
<caption>E-mail address</caption>
<inlineerrormessage>Not a valid e-mail address.</inlineerrormessage>
<summaryerrormessage>* is not a valid e-mail address.</summaryerrormessage>
</email>
<requiredfield>
<inlineerrormessage>This field is required</inlineerrormessage>
<summaryerrormessage>You haven't specified all required fields</summaryerrormessage>
</requiredfield>
this is the xml which tag which is used to display message. I am not able to figure out how summaryerrormessage of required field and for a particular datatype is set.
I want to add to validation on Age [RequiredFieldValidation and RegularExpressionValidator] which is in XForm.
If I add <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="XForm" DisplayMode="BulletList" ShowSummary="true" EnableClientScript="true" runat="server" /> in the form in which XForm is loading it shows only one ErrorMessage for all validations.
You haven't specified all required fields
You haven't specified all required fields
You haven't specified all required fields
I also tried adding custom validation in global.asax.cs
but the problem is that it also show only one custom errormessage. But if i remove this code and keep the validation summary on the aspx page then after showing the errormessage "" it does show the second numeric message.
Any idea how can i add the custom errormessage and 2 validation.