• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NP
#1 Posted : Thursday, December 27, 2018 7:16:54 AM(UTC)
NP

Rank: Member

Joined: 2/10/2017(UTC)
Posts: 59
India
Location: Nashik, Maharashtra

Thanks: 6 times
Hello Team,

We are using BVC 2013 and working on Gift Certificate feature on Checkout module.
If we click on "Add Gift certificate button without adding "Certificate code" then error message not display only * is getting displayed.
We have checked the code on "BVCommerce\Code\www\BVModules\Controls\GiftCertificates.ascx" module where following control is used with error message but message not display.

<bvc5:BVRequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="GiftCertificateTextBox" CssClass="errormessage" ErrorMessage="You must enter a gift certificate id." ValidationGroup="GiftCertificates" >*</bvc5:BVRequiredFieldValidator>

Could you please help us to resolve this issue.

Thank You.
Aaron
#2 Posted : Thursday, December 27, 2018 9:48:41 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,273
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 141 time(s) in 136 post(s)
The ErrorMessage property of ASP.NET validators are used by ValidationSummary controls; they are not displayed inline. The Text property, which can also be specified as the text between the opening and closing tag as shown in the code you pasted, is the message that is displayed inline. So, if you wish to display something other than an asterisk you should change this.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
NP
#3 Posted : Friday, December 28, 2018 2:11:32 AM(UTC)
NP

Rank: Member

Joined: 2/10/2017(UTC)
Posts: 59
India
Location: Nashik, Maharashtra

Thanks: 6 times
Thank You for the Reply

We have added error message instead of "*" in between the opening and closing tag as per your suggestion as follows:

<bvc5:BVRequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate= "GiftCertificateTextBox" CssClass="errormessage" ErrorMessage="You must enter a gift certificate id." ValidationGroup="GiftCertificates" >* Gift Certificate Code is Required</bvc5:BVRequiredFieldValidator>

Even though we have added done mentioned changes then also it displays only "*". So we have debug the code and found that "*" is displayed from BVRequiredFieldValidator_Init function in "BVRequiredFieldValidator.vb" from bvc5.core module. "Content.SiteTerms.GetTerm("ValidatorFieldMarker")" property set * instead of custom message. Please suggest.

So we have done changes on temporally in GiftCertificates.ascx.vb in AddGiftCertificateImageButton_Click().
We have added following code

If Page.IsValid Then
' execute current code
Else ' added else on 28 Dec 18
If RequiredFieldValidator1.Visible = True Then
If RequiredFieldValidator1.Text = "*" Then
RequiredFieldValidator1.Text = "* Gift Certificate Code is Required"
End If
End If

End If

Is this way correct?

Please let us know your comments.
Aaron
#4 Posted : Friday, December 28, 2018 9:57:26 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,273
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 141 time(s) in 136 post(s)
Ah, right. That is how the BVC validator controls work. Probably the easiest way to make the change is to use the standard ASP.NET required field validator (i.e. <asp:RequiredFieldValidator).
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
NP
#5 Posted : Wednesday, January 02, 2019 9:39:00 AM(UTC)
NP

Rank: Member

Joined: 2/10/2017(UTC)
Posts: 59
India
Location: Nashik, Maharashtra

Thanks: 6 times
Thank You for the reply
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2019 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012