Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage

Version: - string  

Summary

Returns the validation error message associated with the particular field.

Settings

The value is based on the Error message input field under the paragraph settings.(Page > Paragraph > Module tab > Enable validation panel)

Remarks

Replace [FieldSystemName] with the field system name.

Examples

Outputting the template tag

@GetString("Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage"); }

Outputting the template tag

<!--@Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage-->

Check if string has a value

<!--@If Defined(@Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage)--> Let's output this tag here: <strong><!--@Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage--></strong> <!--@EndIf(@Ecom:Cart.ValidationError.[FieldSystemName].ErrorMessage)-->