How to validate the template merge fields syntax in our java application

  1. For example, my template file has { empname}} , here missing one brace { at left side.

How to validate the template merge fields syntax in our java application.

  1. Similarly for others like for each & if ?

{ #foreach smoetable }} {{ someList }} {{ /foreach someTable }}

@Rakesh_M I am afraid, there is no way to validate mail merge mustache syntax using Aspose.Words. Creating, handling and validating templates are the Aspose.Words user’s responsibility.
You can consider using regular MS Word merge fields instead of mustache syntax. Using standard MS Word fields is less error prone then using simple text placeholders like mustache syntax.

1 Like

thank you, I also realized the same :slight_smile: slight_smile:

2 Likes