Input Validation

How to enforce string ID and value validation on GL Strings

This article will show GL Strings users how to monitor forbidden characters in string IDs or within a string’s value. You will also learn how to avoid errors in your translations, such as missing variables or tags, glossary terms, or strings that exceed their maximum length.

Table of Contents

  1. Input Validations
  2. Filter for Failed Validations
  3. Regular Expression Examples

Input Validations

Navigate to Project Settings in order to configure string input validations.

  1. Go to the project on the dashboard and click Project Settings
  2. Click the Input Validation tab on the left panel

Configure String ID Name Validations

GL Strings users can enforce forbidden characters in string IDs that are manually created on the dashboard.

To configure forbidden characters, go to the String ID Names Validation section and enter the forbidden characters as a range or as a comma separated list: the sets of characters must be defined as a regular expression.

The String ID Name Validations will warn users when a forbidden character is included in a string ID.

Configure String Value Validations

In the String Validation section, users can enable string value validation for manually created strings (both draft and target) that:

  • exceeded their max length
  • are missing glossary term(s)
  • are missing variable(s)
  • contain a forbidden character

To enable these validation checks:

  • Toggle the switch to prevent users from saving draft or target strings that exceed the set character restriction max length, are missing glossary term(s) or variable(s)
  • Enter the forbidden characters as a range or as a comma separated list: the sets of characters must be defined as a regular expression

Back to Top

Filter for Failed Validations

  1. Open the String Management Interface
  2. Click the filter icon in the right-hand corner
  3. Hover over With Issues then click Validation Failed

Back to Top

Regular Expression Examples

  • Only Lowercase

    • Use [^a-z] to only allow lowercase characters and no others such as numbers or special characters
    • Use [A-Z] to only forbid uppercase characters
  • No Numbers

    • Use \d to forbid only numbers
  • Only Numbers

    • Use [^\d] to forbid all characters other than numbers
  • Specific Characters

    • Use [._$] to forbid specific special characters like ._$

Back to Top